]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/sys.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 26 Jun 2019 02:51:49 +0000 (03:51 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 26 Jun 2019 02:51:49 +0000 (03:51 +0100)
etc/profile.d/sys.sh

index 699eb26c631813812475dc735c92391d1dfc7d61..73028048aa2b8fe0b48de31c309a134fb7a01cec 100644 (file)
@@ -73,6 +73,8 @@ sys_arch() {
 }
 
 sys_df() {
+       shell_help "Usage: sys_df [--header]. Print disk mounted status" "$@" && return 1
+       [ "$1" = "--header" ] && echo -e "Dir\tPcent\tUsed\tFree"
        df -h | tail -n +2 | while read -r -a i; do
                mount=${i[0]}
                used=${i[2]}