diff options
| author | Paul Eggert | 2017-03-21 09:18:42 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-03-21 09:19:42 -0700 |
| commit | 14d8b6858a49e97f9b69593df5a8a7886430d43f (patch) | |
| tree | da75771e5eea3f0078870cc74ddb8ed5d26d2790 | |
| parent | abe731eef0fcbc59ef4836e06f6099ea17042b90 (diff) | |
| download | emacs-14d8b6858a49e97f9b69593df5a8a7886430d43f.tar.gz emacs-14d8b6858a49e97f9b69593df5a8a7886430d43f.zip | |
Port and simplify example sh script
* doc/misc/org.texi (noweb-ref): Simplify shell script example and
don’t use ‘tail -1’, which is not portable.
| -rw-r--r-- | doc/misc/org.texi | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 21c8758b802..fca5185337e 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -15327,14 +15327,9 @@ inheritance}).}. | |||
| 15327 | |sed '1d' \ | 15327 | |sed '1d' \ |
| 15328 | #+END_SRC | 15328 | #+END_SRC |
| 15329 | 15329 | ||
| 15330 | ** sort by the percent full | 15330 | ** output mount point of fullest disk |
| 15331 | #+BEGIN_SRC sh | 15331 | #+BEGIN_SRC sh |
| 15332 | |awk '@{print $5 " " $6@}'|sort -n |tail -1 \ | 15332 | |awk '@{if (u < +$5) @{u = +$5; m = $6@}@} END @{print m@}' |
| 15333 | #+END_SRC | ||
| 15334 | |||
| 15335 | ** extract the mount point | ||
| 15336 | #+BEGIN_SRC sh | ||
| 15337 | |awk '@{print $2@}' | ||
| 15338 | #+END_SRC | 15333 | #+END_SRC |
| 15339 | @end example | 15334 | @end example |
| 15340 | 15335 | ||