bin/mydu: if no args were passed, print all sizes
1 files changed, 10 insertions(+), 1 deletions(-) M bin/mydu
M bin/mydu +10 -1
@@ 1,4 1,13 @@ #!/bin/sh # Print human-readable disk size of given files/directories -du -sh "$@" + +if test -z "$*"; then + # No args were passed + du -sh $(hidden) # sizes of hidden files + du -sh * # sizes of files and dirs + du -sh . # total size of current dir +else + # Sizes of given files + du -sh "$@" +fi