![]() |
|
|
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 |
| Deleting lines in text file | hern14 | UNIX for Dummies Questions & Answers | 5 | 05-16-2008 04:03 PM |
| Pulling multiple lines of text | DumDum | Shell Programming and Scripting | 2 | 03-10-2008 12:15 PM |
| Deleting Lines from .CSV Files | 009satya | Shell Programming and Scripting | 1 | 11-13-2006 03:30 PM |
| deleting multiple files through ftp | mgirinath | Shell Programming and Scripting | 4 | 04-18-2006 03:44 PM |
| Deleting Multiple Lines with sed | rambo15 | Shell Programming and Scripting | 1 | 02-16-2002 06:19 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
deleting lines from multiple text files
I have a directory full of text data files.
Unfortunately I need to get rid of the 7th and 8th line from them all so that I can input them into a GIS application. I've used an awk script to do one at a time but due to the sheer number of files I need some kind of loop mechanism to automate it. The awk script used: - awk 'BEGIN{getline f;getline t}FNR==f,FNR==t{next}1' numbers.txt inputfile > outputfile where numbers.txt is merely a document with the numbers 7 and 8 My guess is that I need a way of piping the output from ls (of the directory) into where the inputfile is situated and a counter to loop through till the end. Any suggestions will be welcome (an awk suggestion would be preferable to pearl) Thanks all |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|