awk field separator

Mark J. Reed mark.reed at sware.com
Thu Feb 22 14:51:13 EST 1996


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.






More information about the Ale mailing list