Skip to content

Instantly share code, notes, and snippets.

@escowles
Created September 16, 2020 12:31
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 escowles/3eb2157e4c325e617d8928182c73ba56 to your computer and use it in GitHub Desktop.
Save escowles/3eb2157e4c325e617d8928182c73ba56 to your computer and use it in GitHub Desktop.
#!/bin/sh
# lookup redirect URL for all ARKs in file "arks.txt"
function f
{
read ARK
while [ "$ARK" ]; do
LOC=`curl -s -I https://n2t.net/$ARK | grep Location`
echo $ARK $LOC
read ARK
done
}
cat arks.txt | f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment