Re: Help needed with sed command
You can escape the forward slashes with back slashes but i prefer to use a different character with file paths for readability
For a qucik example... (the : character becomes the delimiter.
sed -i 's:/var/www/prestashop:/var/www/ma-hotte-deco:g' *
For escaping the backslash character.
matthew-S206:/home/matthew % cat tmp
matthew-S206:/home/matthew % sed 's:/var/www/prestashop:/var/www/ma-hotte-deco:g' tmp
sed -i "s/\/var\/www\/prestashop/\/var\/www\/ma-hotte-deco/g" *
Last edited by matt_symes; June 17th, 2013 at 03:44 PM.
If you believe everything you read, you better not read. ~ Japanese Proverb
If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain