Skip to content

Instantly share code, notes, and snippets.

@lg3bass
Last active January 17, 2018 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lg3bass/e99cbd83fa476a68f1f05fd622baa02e to your computer and use it in GitHub Desktop.
Save lg3bass/e99cbd83fa476a68f1f05fd622baa02e to your computer and use it in GitHub Desktop.
Download a file using CURL and keep the existing filename.
//download a file (while keeping the filename)
curl -s -O 'http://abmedia.pearsoncmg.com/video/audio/mypsychlab/baron_0205205585/barron_5858_01_00.mp3'
//place a number of links you want to dl in a .sh file
#!/bin/sh
curl -s -O 'http://abmedia.pearsoncmg.com/video/audio/mydevelopmentlab/arnett_0205892493/01_adolescence_and_emerging_adulthood.mp3'
curl -s -O 'http://abmedia.pearsoncmg.com/video/audio/mydevelopmentlab/arnett_0205892493/01a_adolescence_and_emerging_adulthood.mp3'
curl -s -O 'http://abmedia.pearsoncmg.com/video/audio/mydevelopmentlab/arnett_0205892493/01b_adolescence_and_emerging_adulthood.mp3'
//save the file as dl.sh. To run the file change perms and ./dl.sh in the directory you want to dl into.
USRLSML-2HLDV7L:20180117_arnett_0205892493 uwhitbo$ chmod u+x dl.sh
USRLSML-2HLDV7L:20180117_arnett_0205892493 uwhitbo$ ./dl.sh
USRLSML-2HLDV7L:20180117_arnett_0205892493 uwhitbo$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment