From owner-freebsd-questions@FreeBSD.ORG Sat Apr 2 23:30:54 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63954106564A for ; Sat, 2 Apr 2011 23:30:54 +0000 (UTC) (envelope-from kline@ethic.thought.org) Received: from ethic.thought.org (plato.thought.org [209.180.213.209]) by mx1.freebsd.org (Postfix) with ESMTP id F14628FC0A for ; Sat, 2 Apr 2011 23:30:53 +0000 (UTC) Received: from ethic.thought.org (localhost [127.0.0.1]) by ethic.thought.org (8.14.4/8.14.3) with ESMTP id p32NUo6n004938; Sat, 2 Apr 2011 16:30:50 -0700 (PDT) (envelope-from kline@ethic.thought.org) Received: (from kline@localhost) by ethic.thought.org (8.14.4/8.14.3/Submit) id p32NUosA004937; Sat, 2 Apr 2011 16:30:50 -0700 (PDT) (envelope-from kline) Date: Sat, 2 Apr 2011 16:30:50 -0700 From: Gary Kline To: Chris Rees Message-ID: <20110402233050.GB4792@thought.org> References: <0DD2BF5C-7387-4AFA-BF43-B1683F3773E8@d3photography.com> <20110402130739.4253ea30@napoleon> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 24 years of service to the Unix community. X-Spam-Status: No, score=-2.9 required=3.9 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on ethic.thought.org Cc: Mike Jeays , freebsd-questions@freebsd.org Subject: Re: graphical representation of `du` X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2011 23:30:54 -0000 On Sat, Apr 02, 2011 at 06:30:15PM +0100, Chris Rees wrote: > On 2 April 2011 18:22, Chris Rees wrote: > > On 2 April 2011 18:07, Mike Jeays wrote: > >> On Sat, 2 Apr 2011 17:15:04 +0100 > >> Chris Rees wrote: > >> > >>> du -h . | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }' | > >>> awk '{print($2" ["$1"]");}' | sed -e 's,[^-][^/]*/,--,g' -e 's,^,|,' > >> > >> > >> I confess to being impressed... > >> > > > > Yeah, but perhaps I should have used sed instead of the second awk; > > fewer processes: > > > > du -h | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }' | sed > > -e 's,^[^1-9]*\([^___CTRL-V+TAB______]*\)____CTRL-V+TAB_____*\(.*\)$,\2 > > \[\1\],;s,[^-][^/]*/,--,g;s,^,|,' > > > > 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. > > > > Chris > > > > Final version: > > http://www.bayofrum.net/~crees/graphical_du.sh > > Maybe I should port it... > > Chris PULeesese DO port that ..... [!!] gary > _______________________________________________ > 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" > -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix The 7.98a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ethic Coming soon to http://transfinite.thought.org: On_Suicide