Created
November 9, 2017 22:25
-
-
Save tuffacton/a2d5cac69f6c813b534ab000d5687a2c to your computer and use it in GitHub Desktop.
Quick shell commands to retrieve and download pdfs from a document containing online links.
This file contains 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
# Strip URLs from a file (in this case, a markdown file called Notes.md) | |
# Append to a working file called link_list.txt | |
$ grep -o 'https://[^)]*.pdf' Notes.md > link_list.txt | |
# Download all pdfs from the list you created | |
$ wget -i ../links_list.txt | |
# You might have odd filenames, use rename to rename them | |
# Syntax: | |
$ rename [options] 's/old/new' files | |
# For example, the following will rename all .perl files to .pl | |
$ rename 's/perl/pl/' *.perl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment