deawrias

Extract HTTP URLs from text files

Jan 7th, 2016
2,204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.21 KB | None | 0 0
  1.  
  2. grep http | grep -shoP 'http.*?[" >]' *.txt > http-urls.txt
  3.  
  4. For extracting HTTPS, FTP and other URL format use
  5.  
  6. grep -E '(((https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]' *.txt > urls.txt
Advertisement
Add Comment
Please, Sign In to add comment