On Sat, Aug 04, at 12:40 Ag. D. Hatzimanikas wrote:
> On Fri, Aug 03, at 12:47 Dan Nicholson wrote:
> >
> > I've been confused by this at various times in the past, but here's
> > approximately how I compute things now (and I haven't been scolded in
> > a while :).
> >
> > $ wget tarball.tar.bz2
> > $ du -b tarball.tar.bz2 | awk '{print "size: " $1/1024 " KB"}'
> > $ start=$(du -bs . | cut -f1)
> > $ tar -xf tarball.tar.bz2
> > $ ( cd tarball && do stuff && make DESTDIR=`pwd`/dest install )
> > $ end=$(du -bs . | cut -f1)
> > $ echo $end $start | awk '{print "build size: " ($1 - $2)/1024 " KB"}'
> >
> > Converting to MB as necessary.
> >
>
> Oh well, here is mine.
>
>
> let s:diskspacebefore = substitute(system("sudo du -skx / --exclude=/tools
> --exclude=/mnt
> \ --exclude=/home --exclude=/root --exclude=/tmp".s:builddir.
> \ "|awk '{t += $1}END{print t}'"), '^\(.*\)\n', '\1', '')
>
>
> let s:diskspaceafter = substitute(system("sudo du -skx / --exclude=/tools
> --exclude=/mnt
> \ --exclude=/home --exclude=/root --exclude=/tmp".s:builddir.
> \"|awk '{t += $1}END{print t}'"), '^\(.*\)\n', '\1', '')
> let s:totaldiskspace = substitute(system("perl -e 'printf \"\%.3f\\n\",
> ('".s:diskspaceafter
> \."' - '".s:diskspacebefore."') / 1024 ';"), '^\(.*\)\n',
> '\1', '')
>
Duh!
Now that I am seeing it in mutt, awk doesn't needed now.
I changed the method yesterday when Randy found a bug but the awk
remained.
Thats the main purpose to post in public lists, btw. You can see your
mistakes. Fixed.
--
http://wiki.linuxfromscratch.org/blfs/wiki/Hacking
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page