Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jan 2002 17:15:40 -0600
From:      "Mike Meyer" <mwm-dated-1012259741.cafc81@mired.org>
To:        Eric Six <erics@sirsi.com>
Cc:        questions@freebsd.org
Subject:   Re: Text editiing.... possibility for perl?
Message-ID:  <15439.17436.648645.828631@guru.mired.org>
In-Reply-To: <127548262@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Eric Six <erics@sirsi.com> types:
> So I need the first comma changed to a minus, the next two comma's a
> tab, and the last three changed to periods. I can do some of this
> with 'cut' but not everything I want to do... I figure I cannot be
> the only one that has had to populate a massive amount of forward and
> reverse files in bind.. I figure there might be a perl script for
> this?? 

Just to add to the options:

ed infile <<FILE
1,$s/,/-/
1,$s/,/	/
1,$s/,/	/
1,$s/,/./
1,$s/,/./
1,$s/,/./
w
q
FILE

Sed is a bit easier if you want a filter.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15439.17436.648645.828631>