Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!tut.cis.ohio-state.edu!ucbvax!CompuServe.COM!75046.606 From: 75046.606@CompuServe.COM (Larry W. Virden) Newsgroups: comp.unix.questions Subject: AWK field seperator question Message-ID: <"900215154914.75046.606.CHD39-1"@CompuServe.COM> Date: 15 Feb 90 15:49:15 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 28 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. To do this, I tried: /config/ { FS = "\""; print $2 ; FS = "" next } { print $1, $2 } But, when I try this out, it doesnt perform as expected. I do get fields 1 and 2 if I dont have a record with config in it. I do get info without double quotes if I type config "this is a test" to it. But, if I then type another plain line, I don't get back the default action. Also, Certain things in the pattern field cause the behavior to change - like trying to use a field variable in the patter (e.g. $1 ~ /config/). Can anyone help me? P{.S. I have tried this in the version of gawk that I have anbd it has similar problems there.