![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search a list of lines in file into files | sriram003 | UNIX for Advanced & Expert Users | 2 | 05-20-2008 07:23 AM |
| deleting specific lines from all files in a directory | vrms | UNIX for Dummies Questions & Answers | 3 | 04-25-2008 11:08 AM |
| deleting lines from multiple text files | vrms | Shell Programming and Scripting | 3 | 04-25-2008 11:01 AM |
| Deleting Lines from .CSV Files | 009satya | Shell Programming and Scripting | 1 | 11-13-2006 03:30 PM |
| PHP Outputting finite amount of lines from a file | pondlife | Shell Programming and Scripting | 1 | 10-26-2005 11:44 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
deleting a varying amount of lines from a list of files
I did search the posts for info on this and while there were some in the ballpark, none addressed this specifically. (also I tried to post this once it said I was logged out, so hopefully I'm not sending a duplicate here).
I have a set of files (250 +/-) where I need to delete the first "$x" number of lines and output what remains to a new file (or cat all the results into one file) so far, I was able to piece together this much: cat -n index20a6.html index3e43.html index6a84.html (...and so on) | grep '<TITLE>Section 440.' | awk '{print $1}' it results in this: 973 1722 2219 ... '<TITLE>Section 440.' is on a different line in each file so the amount of line to delete will vary. The missing piece is to delete '1,973d' '1,1722d' '1,2219d' as it goes through and create a new file. (also if I can go through this list recursively rather than list all the files in my command, that would be a bonus!) Thanks for any assitance on this! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|