Quote:
Originally Posted by
bakunin
... ... ...
Absolutely correct, but this (or any solution derived from it) would have nothing to do with the shell or the system - just with the willingness to undergo the effort to actually modify it into a fitting form.
... ... ...
bakunin
You might note that in post #2 in this thread I didn't ask about the shell being used (partly because it doesn't matter here and partly because
bash had already been specified).
I did ask about the OS, and it does matter here if an
awk solution is appropriate (as in the suggestion I would provide if ChicagoBlues showed us that any effort had been put into this problem) since on Solaris systems
awk would need to be changed to
/usr/xpg4/bin/awk or
nawk.
Also, the shell does matter more on Solaris systems than on many other systems since
/bin/sh there is a pure Bourne shell lacking several standard shell parameter expansions, arithmetic expansions, and the
$(command) form of command substitution.