Advertisement
e55db081d05f58a

getUrlsIn

Feb 21st, 2017
6,056
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #Returns all urls found in the path passed as a parameter
  2.  
  3. getUrlsIn(){ p="http(s)?://([a-z0-9_\-]+\.?)+";grep -RishEo $p $1|grep -Eios $p|awk '!u[$1]++';}
  4.  
  5. #Example use:
  6.  
  7.     #getUrlsIn /bin
  8.  
  9. #Output
  10.  
  11.     #http://www.gnu.org
  12.     #http://home.comcast.net
  13.     #http://mail.nl.linux.org
  14.     #http://www.alcove
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement