[nycbug-talk] Re: Simple sed question

Marc Spitzer mspitzer
Fri Jan 7 16:27:14 EST 2005


On Fri, 7 Jan 2005 16:11:58 -0500, michael <lists at genoverly.net> wrote:
> On Fri, 7 Jan 2005 15:53:36 -0500
> Marc Spitzer <mspitzer at gmail.com> wrote:
> 
> > I really dislike TSV files, looking at it how the hell do you tell the
> > difference.
> >
> 
> Tabs, commas, spaces in text data files are like grapes on the grocery
> store floor.  The can be hazardous but, can be avoided.  I frequently
> look at text as data.  I have to deal with 3rd party files all the time.
> I try to get them to use a unique delimiter like bar(|) or carat(^).  In
> my line of business these are rarely used characters.
>

True and good advice.  But my real bitch about TSV is I can not look at it
and tell the difference, I can look at comas and count them easly at least.

And one of my favorate awk tricks for this stuff is:

awk -F delimiter '  right_num_fields != NF { print "ERROR" , RN, $0}' file
 
> Good stuff on SED today, thanks.

What stufff on sed?  I prefer not to use sed.

marc

> Michael
> 
> --
> ---
>




More information about the talk mailing list