awk '{ print $1/1024"K", $1/1024/1024"MB", $1/1024/1024/1024"GB" }'


On 9/27/05, Brad Bendily <[EMAIL PROTECTED]> wrote:
>
> Does anyone know of a command line tool that will
> convert a number into human readable format?
>
> ie:
> 141184412
> equals
>
> 141184KB
> 141MB
> .14GB
>
>
> these numbers are in a log file. I just want to
> be able to glance at the file and see the sizes without
> having to think so hard about it and try to count
> 3 digits from right to left.
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://brlug.net/mailman/listinfo/general_brlug.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/general_brlug.net/attachments/20050928/3c3287bd/attachment.htm
From [EMAIL PROTECTED]  Wed Sep 28 10:01:24 2005
From: [EMAIL PROTECTED] (Brad Bendily)
Date: Wed Sep 28 10:00:52 2005
Subject: [brlug-general] Converting number??
In-Reply-To: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

On Wed, 28 Sep 2005, Eric G Ortego wrote:

> awk '{ print $1/1024"K", $1/1024/1024"MB", $1/1024/1024/1024"GB" }'

sweet. that works like a champ.
thanks eric.

Reply via email to