[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
awk field separator
- Subject: awk field separator
- From: mark.reed at sware.com (Mark J. Reed)
- Date: Thu, 22 Feb 96 14:51:13 EST
I don't know about gawk, which has some improvements over traditional
awk, but in base awk the answer to your question is no.
With perl, you can split based on any regular expression, so, for
instance,
perl -ne '@f = split(/[;:\\]/); print $f[0],"\n";'
would split the line into fields separated by any of the characters in
the brackets, and then print only the first field on a line by itself.