|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi,
Assuming that I have a file with 20 lines and all 20 lines carrying different texts in them, I want to find one particular line. Once I find that line I want to enter a new line after that. Can anyone help me out in giving the sed command forthe same ? Thanks in advance. Rgds, -Vaidu |
|
#2
|
|||
|
|||
|
not sure if this helps but I think this is what you are asking
you have theses lines
one two three you want to enter new line after 2 you need something like this <enter line range here>s/<regular expression>/<regular expression>^M/g as in :%:s/two/two^M/g for ^M type control-v then <enter> this will substitute the code for the new line. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Need the SED command syntax...... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|