|
|
|
| |||||||||
![]() |
|
|
«
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 All,
Does somone knows how to subtetute two string in one sed command. For example i have a file with two lines: Head Eyes I want to subtitute the Head to Leg,and the Eyes to Hands. I tried to write the following command,but it didn't work.... sed "s/Head,Eyes/Leg,Hands/g" file > new_file Please help. Thanks |
|
#2
|
|||
|
|||
|
sed -e "s/Head/Leg/g;s/Eyes/Hands/g" file > new_file
|
|
#3
|
|||
|
|||
|
Thanks,it was very helpfull.
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Sed command |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|