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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.