Code Comments
Programming Forum and web based access to our favorite programming groups.I want to write a command line perl 'script' to delete one or more lines from a file , by line number for eg in sed I can do the same in two steps cat FILENAME | sed -e '1,10d' >FILENAME.TMP mv FILENAME.TMP FILENAME The above mechanism has a lot of pitfalls , like maintaining permissions , making sure FILENAME.TMP does not already exist etc. That is why I want to do it with "perl -i " but I dont want to write a full script for this , because I am going to run it on remote machines ( automated ) , and I cant ftp the script everywhere Any suggestions Thanks Ram
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.