Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!uunet!mcsun!unido!quando!omerzu From: omerzu@quando.quantum.de (Thomas Omerzu) Newsgroups: comp.unix.questions Subject: Re: Awk Field Separators Message-ID: <1673@quando.quantum.de> Date: 22 Aug 90 14:04:51 GMT References: <3729@se-sd.SanDiego.NCR.COM> <1990Aug22.054330.24911@iwarp.intel.com> Reply-To: omerzu@quando.quantum.de (Thomas Omerzu) Distribution: comp.unix.questions Organization: Quantum GmbH, Dortmund, W-Germany Lines: 29 In article <1990Aug22.054330.24911@iwarp.intel.com> merlyn@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@quando.uucp Quantum GmbH, Bitnet: UNIDO!quando!omerzu / omerzu%quando@UNIDO(.bitnet) Dortmund, Germany Internet: omerzu@quando.quantum.de