sed and comma-delimited file
Oleg D.
perl at ipchains.ru
Tue Sep 19 11:23:09 PDT 2006
SigmaX asdf wrote:
> Yo;
>
> I have a series of comma-delimited text files with fourteen columns of
> data and several hundred rows. I want to use a short shell script to
> strip them of the last 9 columns, leaving the same file but with just
> five of its columns. I can do it in C++, but that seems like
> overkill. How would I go about doing it with sed or a similar
> utility?
>
> SigmaX
All of advices were cool
but!
there's a good idea to work around something like that, but I don't
exactly know now how to solve your problem, the idea is:
`perl -pi~ -e 's/foo/bar/g' somefile`
works fine for `somefile'... I think TIMTOWTDI.
--
Oleg D.
--
don't believe every word people use to say, they might be wrong.
an undefined problem has infinitive number of solutions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3233 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060919/a3a5c5d0/smime.bin
More information about the freebsd-stable
mailing list