Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
XP is just a number
 
PerlMonks  

Re: is this correct

by Gloom (Monk)
on Feb 02, 2001 at 19:10 UTC ( [id://56085]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to is this correct

What's append if the file take 150mb of disk space ?

Maybe you may use something like this :

# perl -e 'while(<>){s/\t/ /g;print}' < file > file.tmp;\ > mv file.tmp file;

Update : Thank's arhuman for this comment. This option is really usefull.

Hope this helps

Replies are listed 'Best First'.
Re: Re: is this correct
by arhuman (Vicar) on Feb 02, 2001 at 19:15 UTC
    In case like this (a while loop around one or more files) the perl -ne is usually a good candidate...

    Something like :
    perl -ne 's/\t/ /g;print' file > file.tmp; mv file.tmp file;
      To abstract it a little more

      perl -i.back -pe 's/\t/    /g' file

      The -i means copy original file to file.back and put the output of program in file. The -p is like -n but does while(<>){YOUR_CODE; print;} instead.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://56085]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.