![]() |
|
|
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 |
| Removing specific lines | catgovind | Shell Programming and Scripting | 3 | 04-30-2008 06:40 AM |
| How to read a specific section and modify within | kn.naresh | Shell Programming and Scripting | 2 | 04-18-2008 01:30 AM |
| Printing lines with specific awk NF | jehrome_rando | Shell Programming and Scripting | 1 | 03-13-2007 04:23 AM |
| viewing specific lines | dakid | UNIX for Dummies Questions & Answers | 3 | 05-25-2006 04:25 AM |
| How do you specific lines in a file? | hedgehog001 | UNIX for Dummies Questions & Answers | 2 | 08-23-2005 01:04 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to use sed modify specific lines
Could anybody tell me how I can use sed to modify lines following specific lines? the file is as following:
"TEST/SI1573.lab" 3670 8920 h# 8920 9530 hh 9530 10694 ih . "TEST/DR1/FAKS0/SI2203.lab" 9730 9580 h# 9580 9840 dh 9840 10652 ix 10652 11997 r ........ I want to modify the first fields to 0 of the lines which follows the lines started with "TEST. The file after operation should be: "TEST/SI1573.lab" 0 8920 h# 8920 9530 hh 9530 10694 ih . "TEST/DR1/FAKS0/SI2203.lab" 0 9580 h# 9580 9840 dh 9840 10652 ix 10652 11997 r ........ could anybody tell my how to do that? Thanks in advance. |
| Bookmarks |
| Tags |
| regex, regular expressions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|