Replace /1/ to /2/ using sed
Greetings!
I would like to replace a number along with '/' to a new number but I couldn't figure it out. I have tried the following: Code:
sed -i "s/'/9///8/'/g" test.sh Thanks in advance! |
you need to use another delimiter, for example ! instead of /
|
Is it not possible to use "/" as delimiter?
|
Try using something besides a slash for your replacement delimiter so it's easier to read and that so you won't have to escape the slash you are searching for. sed does not care what it is as long as you use three of a kind.
Code:
sed -e 's|/9|/8|g;' Code:
man sed |
Quote:
|
Okay, I will do as suggested. Thank you.
|
All times are GMT -5. The time now is 09:55 PM. |