sed and comma-delimited file
Brooks Davis
brooks at one-eyed-alien.net
Tue Sep 19 09:35:59 PDT 2006
On Tue, Sep 19, 2006 at 12:26:54PM -0400, 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?
See cut(1):
cut -d, -f1,2,3,4,5
-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060919/1cbf9ea2/attachment.pgp
More information about the freebsd-stable
mailing list