#+begin_src sh :tangle yes :noweb yes :shebang #!/bin/sh <> #+end_src * the mount point of the fullest disk :PROPERTIES: :noweb-ref: fullest-disk :END: ** query all mounted disks #+begin_src sh df \ #+end_src ** strip the header row #+begin_src sh |sed '1d' \ #+end_src ** sort by the percent full #+begin_src sh |awk '{print $5 " " $6}'|sort -n |tail -1 \ #+end_src ** extract the mount point #+begin_src sh |awk '{print $2}' #+end_src