![]() |
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 |
| awk program to select a portion of a line | anju | Shell Programming and Scripting | 3 | 01-11-2008 06:33 AM |
| Backspace erasing the prompt | videsh77 | UNIX for Dummies Questions & Answers | 4 | 01-23-2007 07:38 AM |
| Delete Portion of a file | sameersbn | High Level Programming | 2 | 01-20-2007 12:16 AM |
| erasing portion of line with sed | gammaman | UNIX for Dummies Questions & Answers | 5 | 07-10-2005 10:47 PM |
| erasing old files | lsquillacioti | UNIX for Dummies Questions & Answers | 1 | 04-10-2001 02:45 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
erasing portion of line with sed (only once)
hi,
I'm trying to use sed to erase everything, up to the first parenthesis. for example: input: blah blah blah (aldj) test (dafs) test test. output: (aldj) test (dafs) test test. how would i do this? I was fooling around with the parenthesis, and i only got it to apply on all parenthesis. What would I need to do to make it work on the first parenthesis. Here's what I had: sed "s|.*(||" filename > output thanks, gammaman |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|