Date: Sat, 2 Apr 2011 12:37:40 -0500 From: Ryan Coleman <editor@d3photography.com> To: utisoft@gmail.com Cc: Mike Jeays <mike.jeays@rogers.com>, freebsd-questions@freebsd.org Subject: Re: graphical representation of `du` Message-ID: <06439A14-F0D6-4B79-85D5-031C7BA804D9@d3photography.com> In-Reply-To: <BANLkTik9f0BwY0wtwuLVJeKj5p6VpXzoWQ@mail.gmail.com> References: <0DD2BF5C-7387-4AFA-BF43-B1683F3773E8@d3photography.com> <BANLkTi=trnnEEW6ELSV5JRnW5erm490sTA@mail.gmail.com> <20110402130739.4253ea30@napoleon> <BANLkTin06Pq%2BPw=H=BeV7xtCiJi8iPsySw@mail.gmail.com> <BANLkTik9f0BwY0wtwuLVJeKj5p6VpXzoWQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Wow... You rock! Thanks so much! On Apr 2, 2011, at 12:30 PM, Chris Rees wrote: > On 2 April 2011 18:22, Chris Rees <utisoft@gmail.com> wrote: >> On 2 April 2011 18:07, Mike Jeays <mike.jeays@rogers.com> wrote: >>> On Sat, 2 Apr 2011 17:15:04 +0100 >>> Chris Rees <utisoft@gmail.com> wrote: >>>=20 >>>> du -h . | awk '{a[i++]=3D$0} END {for (j=3Di-1; j>=3D0;) print = a[j--] }' | >>>> awk '{print($2" ["$1"]");}' | sed -e 's,[^-][^/]*/,--,g' -e = 's,^,|,' >>>=20 >>>=20 >>> I confess to being impressed... >>>=20 >>=20 >> Yeah, but perhaps I should have used sed instead of the second awk; >> fewer processes: >>=20 >> du -h | awk '{a[i++]=3D$0} END {for (j=3Di-1; j>=3D0;) print a[j--] = }' | sed >> -e = 's,^[^1-9]*\([^___CTRL-V+TAB______]*\)____CTRL-V+TAB_____*\(.*\)$,\2 >> \[\1\],;s,[^-][^/]*/,--,g;s,^,|,' >>=20 >> That does exactly the same -- where I've put ____CTRL-V+TAB______ = you >> have to type Ctrl-V, then a literal [::tab::] key; BSD sed doesn't do >> \t. >>=20 >> Chris >>=20 >=20 > Final version: >=20 > http://www.bayofrum.net/~crees/graphical_du.sh >=20 > Maybe I should port it... >=20 > Chris > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?06439A14-F0D6-4B79-85D5-031C7BA804D9>