![]() |
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 |
| Delete first line from file and more.... | dfb500 | Shell Programming and Scripting | 6 | 07-02-2009 10:04 AM |
| Delete a line from a file | rohini | UNIX for Dummies Questions & Answers | 8 | 01-07-2009 06:34 AM |
| How to delete line from a file | ramezernest | UNIX for Dummies Questions & Answers | 0 | 11-01-2007 11:56 AM |
| delete line in a file | dta4316 | Shell Programming and Scripting | 12 | 05-18-2005 10:20 AM |
| Delete line(s) from file | elchalateco | UNIX for Dummies Questions & Answers | 4 | 10-11-2002 01:25 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
delete line in file with sed
sed "/$titlesearch/d" movielist
will delete any line in the file movielist that matches $titlesearch, but this is only a screen print correct ? how can I have sed to actually delete the line from the file so that it doesnt appear next time I open the file ? thanks Steffen |
|
|||||
|
Quote:
Code:
# this line does the 'delete'
"g/${titlesearch}/d"
AND
# this line 'Writes' the file to disk and 'Quits' editing the file
'wq'
|
|
||||
|
thats way better, thanks
Steffen |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| sed delete line |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|