Advertisement
Guest User

Untitled

a guest
Sep 30th, 2013
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. sed "s|http://.*|http://$URL|"
  2.  
  3. URL="1.1.1.1/login.php?user=admin\&pass=password"
  4.  
  5. echo "http://something" | sed -e "s|http://.*|http://$URL|"
  6.  
  7. http://1.1.1.1/login.php?user=admin&pass=password
  8.  
  9. URL="1.1.1.1/login.php?user=admin&pass=password"
  10. awk -vurl="$URL" '/http:///{ gsub("http://" , "http://"url) }1' file
  11.  
  12. $ URL="1.1.1.1/login.php?user=admin&pass=password"
  13. $ echo "http://abcd" | sed -e "|http://.*|c$URL"
  14. 1.1.1.1/login.php?user=admin&pass=password
  15.  
  16. URL="1.1.1.1/login.php?user=admin&pass=password"
  17. URL=$(echo "$URL" | sed 's/&/\&/') # substitute to escape the ampersand
  18. echo "$OTHER" | sed "s|http://.*|http://$URL|"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement