this works!

thanks so much.... and here is another solution to share...


awk '{print $1"       " $2}' /tmp/filename |tr -s "  "|sed 's/ / mb .g'


Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145





James Edward Gray II <[EMAIL PROTECTED]>
04/08/2004 01:12 PM

 
        To:     [EMAIL PROTECTED]
        cc:     Perl Beginners <[EMAIL PROTECTED]>
        Subject:        Re: inserting a string in between two other strings


On Apr 8, 2004, at 12:01 PM, [EMAIL PROTECTED] wrote:

> Does anyone have a one liner using perl, awk or sed that will insert 
> "mb"
> between the "6" and "f" ?
> For example,  144.06   free

Not exactly what you asked for, but try:

perl -pi.bak -e 's/(\d)\s*(free)/$1mb $2/g' file_to_modify

James


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to