sed and comma-delimited file
N.J. Mann
njm at njm.f2s.com
Tue Sep 19 09:50:52 PDT 2006
On Tue 19 Sep 12:26, SigmaX asdf wrote:
> 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?
cut -d, -f 1-5
Cheers,
Nick.
--
"You call _that_ a knife? _This_ is what _I_ call a knife!"
"Really? No worries. _This_ is what I call a crossbow!"
More information about the freebsd-stable
mailing list