Advertisement
fduran

Replace relative to absolute URL in file

Aug 15th, 2011
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.20 KB | None | 0 0
  1. # www.fduran.com
  2. # replace in a file (index.php for example) links from relative <a href="/path to absolute <a href="http://example.com/
  3.  
  4. sed -i 's/href=\"\//href=\"http:\/\/example.com\//g' index.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement