sed and comma-delimited file

Joan Picanyol i Puig lists-freebsd-stable at biaix.org
Tue Sep 19 09:39:31 PDT 2006


* SigmaX asdf <fydernix at gmail.com> [20060919 18:31]:
> 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

qvb
-- 
pica


More information about the freebsd-stable mailing list