On Tue, Mar 25, 2003 at 02:19:58PM -0800, Bill Campbell wrote:
>On Fri, Feb 21, 2003 at 12:01:09PM -0800, Bill Campbell wrote:
>
>Resurrecting an old question because I ran into the size= problem
>again today, and updated to openpkg-20030324-20030324 before
>digging into it again.  The current version is using:
>
>       size=`ls -l $ldir/$file | awk '{printf "%d\n", $5}'`

I happened to remember that there's a stat(1) command, and it's
included in the coreutils so this would simplify it completely:

        size=`stat --format='%s' $ldir/$file`

Perhaps this doesn't belong in the publically accessible shtool,
but only in the private copy used by openpkg since it can be sure
that there's a working version of the stat(1) program available.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

A Galileo could no more be elected president of the United States than
he could be elected Pope of Rome.  Both high posts are reserved for men
favored by God with an extraordinary genius for swathing the bitter
facts of life in bandages of self-illusion.
                -- H. L. Mencken
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   [EMAIL PROTECTED]

Reply via email to