I agree. As an extention, the one liner can be used to insert a period.
For example
011001 to 01.1001
perl -pi -e's/^(\d{2})/\1\./' yourfile.txt
Alfred Vahau
Project Breeze
UniPNG
---------------------------------------------------
RE: add info to beginning of a line
Date: Fri, 19 Apr 2002 10:55:16 -0700
From: Timothy Johnson <[EMAIL PROTECTED]>
To: "'John W. Krahn'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
That's a neat trick. I'll have to use that.
-----Original Message-----
From: John W. Krahn [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 10:27 AM
To: [EMAIL PROTECTED]
Subject: Re: add info to beginning of a line
Ernie Tucker wrote:
>
> I have a text file that has a list of info. I need to add a 00 to the
> beginning of each line. What is the best way to do this?
perl -pi -e's/^/00/' yourfile.txt
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]