Re: awk question
Re: awk question
- Subject: Re: awk question
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 15 Dec 2006 14:34:00 -0500
On 12/15/06, Martin Orpen <email@hidden> wrote:
awk 'BEGIN { FS=" +"; OFS=" | " } { print $1, $2, $3, $4, $5 }'
He shoots, he scores...
Offensive foul!
That may happen to work on the sample data (though not quite, since it
leaves the quotation marks in the field value), but it doesn't
generalize. With some extra code to strip the quotes off, it might
even be good enough for John's actual data set, but it doesn't meet
the stated objective. A quoted string containing two adjacent spaces
will get split; two unquoted words with only a single space between
them will get joined.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden