Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Search Forums:



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 !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-06-2005
Registered User
 

Join Date: Apr 2004
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Question delete a line based on first character of the line

Hi,

I need to delete all lines in a file which starts with "|" character. Can some one assist me?

Thanks
Sponsored Links
    #2  
Old 12-06-2005
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 8,511
Thanks: 67
Thanked 403 Times in 392 Posts

Code:
 grep -v "^|" oldfile > newfile

Sponsored Links
    #3  
Old 12-06-2005
Registered User
 

Join Date: Apr 2004
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks...That works
Sponsored Links
Closed Thread

Tags
grep -v

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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



All times are GMT -4. The time now is 03:47 AM.