On Wed, 8 Dec 2004, Bob Miller wrote:
> ls -l $file | awk '{print $5}'
"ls" is fragile. It allows the size field to grow until it merges
with the one before it, causing your example here to break. You
can make it slightly more robust with "cut" instead of "awk". But
that still will break, when the size grows big enough to overflow
its field size.
In my opinion "ls" should have been replaced long ago. It should
use a method more like "date", where you specify the format. That
would give more flexibility while getting rid of that alphabet of
options. And it would totally solve problems such as this one.
--
Allen Brown
work: Agilent Technologies non-work: http://www.peak.org/~abrown/
[EMAIL PROTECTED] [EMAIL PROTECTED]
Q: How many astronomers does it take to replace a light bulb?
A: One---The astronomer holds the bulb while the galaxy rotates.
_______________________________________________
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug