Awk Field Separators
Thomas Omerzu
omerzu at quando.quantum.de
Thu Aug 23 00:04:51 AEST 1990
In article <1990Aug22.054330.24911 at iwarp.intel.com>
merlyn at iwarp.intel.com (Randal Schwartz) writes:
|| Does anybody know how to specify more than one field separator in Awk?
|| I would like to specify to an Awk program to treat single spaces as well
|| as bars as field separators so that a string such as :
||
|| 12 12 12 34|34|34
[...]
|
|There's no easy way to handle it in plain Awk. (Alright everyone, what's
|the next phrase... come along now...) Get Perl.
[...]
And, if you aren't lucky (?) enough to have
Perl, you might use
sed 's/|/ /g' | awk ...
So you will only have to deal with one field separator in Awk.
--
*-----------------------------------------------------------------------------*
Thomas Omerzu UUCP: ...!unido!quando!omerzu / omerzu at quando.uucp
Quantum GmbH, Bitnet: UNIDO!quando!omerzu / omerzu%quando at UNIDO(.bitnet)
Dortmund, Germany Internet: omerzu at quando.quantum.de
More information about the Comp.unix.questions
mailing list