瀏覽代碼

Backport commit 14d8b6858 from Emacs

* doc/org.texi (noweb-ref): Simplify shell script example and don’t
use ‘tail -1’, which is not portable.

Port and simplify example sh script
14d8b6858a49e97f9b69593df5a8a7886430d43f
Paul Eggert
Tue Mar 21 09:19:42 2017 -0700
Paul Eggert 8 年之前
父節點
當前提交
18d9b2181b
共有 1 個文件被更改,包括 2 次插入7 次删除
  1. 2 7
      doc/org.texi

+ 2 - 7
doc/org.texi

@@ -16179,14 +16179,9 @@ source code in each block is extracted for concatenation to a pure code file.
    |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