Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!mrsvr.UUCP From: starr@mrsvr.UUCP (Larry Starr,Mezzanine,46971,5638828) Newsgroups: comp.unix.questions Subject: Re: AWK field seperator question Message-ID: <2069@mrsvr.UUCP> Date: 15 Feb 90 20:01:50 GMT References: <"900215154914.75046.606.CHD39-1"@CompuServe.COM> Sender: news@mrsvr.UUCP Lines: 26 From article <"900215154914.75046.606.CHD39-1"@CompuServe.COM>, by 75046.606@CompuServe.COM (Larry W. Virden): > I have an awk question. I am using SunOS 4.0.2 on a Sun 386i. > I want to , within a particular pattern { action }, reset the > Field Seperator, process the current record, then set the FS back > to the default action. > > [ stuff about previous attempts deleted ] Why not try something straight forward ( and supported ) n = split($0,x,"\"") print x[2] This splits the input record around the quote into aray x you might want to check n to see how many fields resulted etc. The FS variable is used when awk reads the record so the result of your first attempt is to set FS for the next record ( not the current one). -L. Starr -- Larry Starr MR Research Facility G.E. Medical Systems