summaryrefslogtreecommitdiff
path: root/doc/misc/org.texi
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-03-21 09:18:42 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-03-21 09:19:42 -0700
commit14d8b6858a49e97f9b69593df5a8a7886430d43f (patch)
treeda75771e5eea3f0078870cc74ddb8ed5d26d2790 /doc/misc/org.texi
parentabe731eef0fcbc59ef4836e06f6099ea17042b90 (diff)
downloademacs-14d8b6858a49e97f9b69593df5a8a7886430d43f.tar.gz
emacs-14d8b6858a49e97f9b69593df5a8a7886430d43f.tar.bz2
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.
Diffstat (limited to 'doc/misc/org.texi')
-rw-r--r--doc/misc/org.texi9
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}).}.
|sed '1d' \
#+END_SRC
- ** sort by the percent full
+ ** output mount point of fullest disk
#+BEGIN_SRC sh
- |awk '@{print $5 " " $6@}'|sort -n |tail -1 \
- #+END_SRC
-
- ** extract the mount point
- #+BEGIN_SRC sh
- |awk '@{print $2@}'
+ |awk '@{if (u < +$5) @{u = +$5; m = $6@}@} END @{print m@}'
#+END_SRC
@end example