On Mar 23, 1:41 am, Ed Morton <mor...@[EMAIL PROTECTED]
> wrote:
> On 3/23/2008 12:13 AM, spacegoose wrote:
> <snip>
>
> > That did it. Thanks. One last thing: Can this be combined into one
> > file to act on myFile:
> > so that everything is contained in one file (with a reference to
> > myFile inside)?
>
> I think what you want is to put this in a file:
>
> ------------
> df -h | sort +5 | awk '
> BEGIN {
> printf "%-15s%12s%10s%10s%10s%10s\n", "File System", "bytes", "used",
"avail",
> "capacity", "accounts"
> print
"-------------------------------------------------------------------"}
>
> NR==FNR{ accts["/local/ds/"$5]++; next }
> /dsk/ { printf "%-15s%12s%10s%10s%10s%10s\n", $6, $2, $3, $4, $5,
accts[$6]+0 }
> ' myFile -
> -------------
>
> Regards,
>
> Ed.
This is working, Thanks Ed.
Can you make the columns tally at the bottom?


|