From owner-freebsd-questions Mon Oct 16 0: 7:44 2000 Delivered-To: freebsd-questions@freebsd.org Received: from web6305.mail.yahoo.com (web6305.mail.yahoo.com [128.11.22.142]) by hub.freebsd.org (Postfix) with SMTP id 61D2137B502 for ; Mon, 16 Oct 2000 00:07:41 -0700 (PDT) Message-ID: <20001016070741.24118.qmail@web6305.mail.yahoo.com> Received: from [64.161.130.86] by web6305.mail.yahoo.com; Mon, 16 Oct 2000 00:07:41 PDT Date: Mon, 16 Oct 2000 00:07:41 -0700 (PDT) From: Christian Lacunza Subject: Re: AWK trivia To: Marc Wandschneider Cc: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi Marc. apparently /usr/bin/awk is really gawk, so you can set FS to a regexp like this: /usr/bin/awk -F ' *"' and that does what you wanted. -- christian. > blaugh! > > so, i have a file in the following format: > > SOME_SINGLE_WORD STRING "A quoted String" > > Where the two things are separated by any amount of whitespace, not > including \n. > > I would like to set up AWK so that I end up having: > > $1 = SOME_SINGLE_WORD_STRING > $2 = "A Quoted STring" > > for each line/record [with or without the quotes]. > > this actually appears to be non-trivial. > > any suggestions? i've zipped through the two texts i have on it, > without much luck. > > thanks! > > marc. __________________________________________________ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message