![]() |
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 |
| Search and replace | jobbyjoseph | Shell Programming and Scripting | 12 | 02-07-2008 02:33 AM |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 10:24 AM |
| SED Search and Replace Question for Google Analytics | Neo | Shell Programming and Scripting | 11 | 08-07-2007 06:32 PM |
| search and replace | tungaw2004 | Shell Programming and Scripting | 1 | 03-23-2007 11:59 PM |
| sed search and replace | d__browne | UNIX for Dummies Questions & Answers | 7 | 04-26-2006 09:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
search and replace one more question
Hi,
I have a file that contains the following contents: 14:05 apple orange123 456mango 16:45 banana I wanted to replace ONLY the "14:05 " and "16:45" with nothing and trying to use the following syntax sed -e 's/[0-9][0-9]*//g' -e 's/^: //g' my_file > new_temp cat new_temp apple orange mango banana I only wanted to replace the "14:05 " and "16:45" and do not want to change the name of orange123 and 456mango while the above command has changed the file name as well. Can someone correct my syntax. I apprecaite you help in advance Regards, Ghazi |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|