Nice little script. I can see using this on some of the Windows/NAS servers at my office; but, in *nix land I'll almost always do
find /usr/local -type d | xargs du -s
Which gives
6784 /usr/local
88 /usr/local/bin
24 /usr/local/OpenSourceLicenses
8 /usr/local/OpenSourceVersions
6664 /usr/local/share
6664 /usr/local/share/man
200 /usr/local/share/man/man1
6464 /usr/local/share/man/man3
You might want to think about giving an option to mimic this minimal, data only output so it'd be easy to pipe the output into another script or program and not have to weed out ---- and version lines. Maybe two options, one for the version of the program (instead of outputing it by default, -version) and one for pretty formatting (-pretty-print maybe?). Just a thought. Good work, though.
---
echo S 1 [ Y V U | perl -ane 'print reverse map { $_ = chr(ord($_)-1) } @F;'
Warning: Any code posted by tuxz0r is untested, unless otherwise stated, and is used at your own risk.
|