Date: Sun, 15 Oct 2000 20:53:05 +0200 From: "Marc Wandschneider" <marcw@lanfear.com> To: "Jim Conner" <jconner@enterit.com> Cc: <freebsd-questions@freebsd.org> Subject: Re: AWK trivia Message-ID: <000b01c036d9$29e74780$0800000a@lanfear.com> References: <5.0.0.25.0.20001015234305.0289a368@mail.enterit.com>
next in thread | previous in thread | raw e-mail | index | archive | help
hmm ... i was a bit afraid that sed would be the better way of doing
that -- i'm using AWK because i want to be able to process each line of
input and take
STRING "QUoted String"
and produce
{ { STRING }, "Quoted String },
on stdout as output.
and then have it do something at the beginning and end (which would
probably just work with cat, i suppose :-)
thanks!
marc.
----- Original Message -----
From: "Jim Conner" <jconner@enterit.com>
To: "Marc Wandschneider" <marcw@lanfear.com>
Cc: <freebsd-questions@freebsd.org>
Sent: Monday, October 16, 2000 5:44 AM
Subject: Re: AWK trivia
> Use SED
>
> sed -e "s/$LINE1/$LINE2/g" file
> You may have to do some tweaking...but probably not much (with regards to
> the double-quotes)
>
> - Jim
>
> At 08:22 PM 10/15/2000 +0200, Marc Wandschneider wrote:
>
>
> >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.
> >
> >
> >
> >
> >
> >To Unsubscribe: send mail to majordomo@FreeBSD.org
> >with "unsubscribe freebsd-questions" in the body of the message
>
>
> - Jim
> - NOTJames
> - jconner@enterit.com
>
> -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> - | Today's errors, in contrast:
|
> - | Windows - "Invalid page fault in module kernel32.dll at 0032:A16F2935"
|
> - | UNIX - "segmentation fault - core dumped"
|
> - | Humans - "OOPS, I've fallen and I can't get up"
|
> - ------------------------------------------------------------------------
--
> - (To view this properly use a non-proportional font in your MUA)
>
>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000b01c036d9$29e74780$0800000a>
