Last active
September 10, 2015 15:22
-
-
Save 64lines/295c3ecad873fc68015e to your computer and use it in GitHub Desktop.
BASH - Extract all the external links of a web page and save them to a file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You will need 2 tools, lynx and awk, try this: | |
| $ lynx -dump http://www.google.com.br | awk '/http/{print $2}' > links.txt | |
| If you need numbering lines, use command nl, try this: | |
| $ lynx -dump http://www.google.com.br | awk '/http/{print $2}' | nl > links.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment