Quote:
Originally Posted by
DukeNuke2
there was a problem with the first line...
Not really a problem unless you use an obsolete, non POSIX shell ...
Also, your substitute nawk by awk which makes that part roughly four times slower. I'm ruling out you have /usr/xpg4/bin first in your PATH otherwise you wouldn't have complained about the POSIX $(...) syntax.
Quote:
and a "cut" is much faster then "awk" in this case....
You are correct here. Perhaps speed is no big deal in the OP case and I find the (n)awk syntax more readable.