[H-GEN] Formatting of ls (grep??)
David de Groot
david-humbug at viking.org.au
Sun Apr 18 07:48:36 EDT 2004
On 18/04/2004, at 9:28 PM, David de Groot wrote:
> Then run this:
>
> ls -la | grep "sitedynamics.com.au" | awk -f parse.awk
>
Hmm, by adding:
/sitedynamics.com.au/
just before the { after the BEGIN { } block, you can do away with the
grep too, thus saving further system resources by only doing one pipe.
So the start of the script would then look like:
BEGIN {
FS=" "
}
/sitedynamics.com.au/ {
numstr=$11;
And you'd run it like:
ls -la | awk -f parse.awk
See only one pipe :)
Dave
~yeah I should have thought of that at the time of the first post, but
I was being hassled by a toddler...
More information about the General
mailing list