![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| remove : lines from file | aronmelon | Shell Programming and Scripting | 5 | 06-10-2009 11:46 AM |
| remove lines from file | lweegp | Shell Programming and Scripting | 10 | 03-15-2009 11:51 PM |
| vi to remove lines in file | kjbaumann | UNIX for Dummies Questions & Answers | 2 | 03-13-2009 03:40 AM |
| To remove the lines in my file | gsiva | Shell Programming and Scripting | 5 | 03-05-2009 06:13 AM |
| remove lines from file | bluemoon1 | Shell Programming and Scripting | 9 | 11-09-2007 01:40 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hello,
I would like to remove n lines from all the files in a given directory. If it were one file, I can use the sed 'start, finish d' command. How can I extend this to an entire directory of files? Thanks, Gussi. |
|
|||||
|
A simple search of this site provides many answers.
The search keywords are pretty easy ![]() sed+multiple+files+in+a+directory |
|
||||
|
Thanks Neo. I did do something like what was suggested in one of the posts and executed the following script:
Code:
#!/bin/sh for x in * do sed '1,13d' $x > temp cat temp > $x rm temp done exit 0 Thanks, Gussi |
![]() |
| Bookmarks |
| Tags |
| remove lines |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|