Re: ls with user-specified attribute columns

From: Paul Hepworth <paul1+vsta_at_nospam.org>
Date: Wed Mar 03 2004 - 04:08:16 PST

> > stat -w -- xkeys=0
> What's the -- for here?

Silly me, obviously that's stdin. Oddly, I can stat -w -- but I can't just
stat --.

Anyway... rather than go to the trouble of enhancing stat at this time, I'm
just going to use a shell script, something like:

fields=$1
shift
for f in $*
do
    echo $f: `stat $f $fields`
done

The fields vs files issue is solved by making fields a single paramter:
stats "field1 field2 field3" file1 file2 file3

Paul
Received on Wed, 3 Mar 2004 05:08:16 -0700

This archive was generated by hypermail 2.1.8 : Tue Sep 26 2006 - 09:03:09 PDT