On Sun, Jun 18, 2000 at 01:44:14PM -0700, Paul Eggert wrote:
> If the file's size is sufficiently small and if the locale is C (which
> is the case here), you should be able to compute the file's size with
> this portable script:

you left out an assumption: not all 'ls' programs are consistent about
whether they show user+group or user alone.
 
> set X `ls -l "$file"`
> case "$6" in
>   [0-9]*)
>     size=$6;;
>   *)
>     # We are on a non-POSIX host and the group was omitted,
>     # or the user overflowed into the group.
>     size=$5;;
> esac

-- 
Thomas E. Dickey <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com

Reply via email to