Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cmcl2!lanl!lambda.lanl.gov!dph From: dph@crystal.lanl (David Huelsbeck) Newsgroups: comp.unix.questions Subject: Re: AWK Question Message-ID: Date: 5 Oct 89 21:57:21 GMT References: <281@nisca.ircc.ohio-state.edu> <2308@munnari.oz.au> Sender: news@lanl.gov Organization: /home/woodsy4/dph/.organization Lines: 17 In-reply-to: ok@cs.mu.oz.au's message of 5 Oct 89 10:28:52 GMT It's been a little while since I did much awking but I did A LOT of it at one time. I'm not sure if it's the same in the new awk but in the old awk setting FS to null gave you the default field separator of whitespace. That is, if you set it to space or tab, single spaces and tabs would separate fields so a series of either would give you a bunch of null fields, but setting it to null gave you the default behavior back. So your: > BEGIN {FS=""} doesn't do anything at all. The correct technique is to use substr(). This has already been addressed by others so I'll spare you all the grief of seeing it again. -dph (still waiting for comp.lang.awk)