|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | 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 !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I need to delete all lines in a file which starts with "|" character. Can some one assist me? Thanks |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
Code:
grep -v "^|" oldfile > newfile |
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
Thanks...That works
|
| Sponsored Links | ||
|
|
![]() |
| Tags |
| grep -v |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to delete text from line starting pattern1 up to line before pattern2? | repudi8or | Shell Programming and Scripting | 5 | 04-15-2008 09:25 PM |
| Need to serach if a new line character exists on the last line in a file | sunilbm78 | UNIX for Dummies Questions & Answers | 10 | 02-29-2008 01:15 PM |
| how to delete line with matching text and line immediately after | orahi001 | UNIX for Dummies Questions & Answers | 6 | 01-14-2008 11:34 PM |
| extracting a line based on line number | narendra.pant | Shell Programming and Scripting | 2 | 09-20-2007 05:00 AM |
| How to delete last character of a line? | ctcuser | Shell Programming and Scripting | 2 | 06-20-2005 07:35 PM |
|
|