awk field separator

James Rowell jrowell at balrog.ops.tridom.com
Thu Feb 22 15:53:55 EST 1996


> From ale-owner at cc.gatech.edu Thu Feb 22 15:10:20 1996
> From: ferrolb at systecinc.com (Blackmon, Ferrol)
> To: ale at cc.gatech.edu ('ale at cc.gatech.edu')
> X-Mailer: Microsoft Mail via PostalUnion/SMTP for Windows NT
> Mime-Version: 1.0
> Content-Type> : > text/plain> ; > charset="US-ASCII"> 
> Organization: Systems Techniques, Inc
> Date: Thu, 22 Feb 1996 14:49:45 -0500
> Subject: awk field separator
> Sender: owner-ale at cc.gatech.edu
> Content-Length: 549
> 
> 
> Hey folks,
> 
> Is there a way in awk to specify multiple field separators?  Like FS =   
> ";" | ":" | "\"  I know this doesn't work, I just wanted to show what I'm   
> trying to accomplish.  BTW, FS=";:\" doesn't work B/C it thinks I mean   
> the entire string ";:\".  Has anyone tackled a problem like this before.
> 
What I've done in the past was to translate the field separators into a 
single field separator then call up awk. For example,

<infile tr \; : | tr \\ : | awk -F: '{whatever...}'

James  






More information about the Ale mailing list