Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Script to delete lines from a file
Name: kangfu Date: May 11, 2006 at 17:37:03 Pacific OS: linux CPU/Ram: intel
Comment:
hi,
I am trying to write a script to delete few lines from the existing files.
The requirement is as follows: 1. I need to grep for a pattern "abc" in a file and then grep for "xyz" 2. I need to delete all the lines (may be 2, 3 or more) between these 2 patterns.
what is the best possible way to do it. There ar multiple such files. PLs let me know the possible solution.
Summary: I was wondering if you could help me with a script to remove ALL the lines in a file that contain the word "BOUNDARY". I have the script like this so far, but It will only remove the first occurance ...
Summary: Hi All, I want to get the first line from a file and write it into another file. Please help. Thanks in advance. Regards, Raj Thanks & Regards, Raj...
Summary: Hello all, I have wriiten a script to create a html file on the fly. It is as shown below :- 1>echo " " > log.html 2>cat test.log >> log.html 3>echo " " >> log.html The log.html file puts the tes...