Skip to content

Instantly share code, notes, and snippets.

@jamiehs
Created July 2, 2013 17:47
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 jamiehs/5911467 to your computer and use it in GitHub Desktop.
Save jamiehs/5911467 to your computer and use it in GitHub Desktop.
Looping through a list of URLs in a text file and optionally stripping the schema.
#!/bin/bash
for URL in $(cut -d, -f2 < url_list.txt)
do
URL=$(sed -e 's/^http\(\|s\):\/\///g' <<< "$URL" )
echo $URL
done
http://www.amazon.com
https://gist.github.com
http://www.wikipedia.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment