Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!wa4mei!bcs800!jeffr From: jeffr@bcs800.UUCP (Jeff Riegel) Newsgroups: comp.unix.questions Subject: Re: Awk Field Separators Message-ID: <986@bcs800.UUCP> Date: 23 Aug 90 19:06:50 GMT References: <3729@se-sd.SanDiego.NCR.COM> Distribution: comp.unix.questions Organization: Brock Control Systems, Atlanta, Georgia Lines: 19 In <3729@se-sd.SanDiego.NCR.COM> cubbage@se-sd.SanDiego.NCR.COM (Sharon Cubbage) 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 >will be said to have 6 fields. I've tried to create a regular expression >to handle both cases but it hasn't been working. >Any hints? >Thanks! >Sharon How about using tr to comvert "|" to " ", and if you need 1the "|"'s use awk and printf to recreate the new file properly delimited...