Skip to content

Instantly share code, notes, and snippets.

@balasankarc
Created July 19, 2016 08:12
Show Gist options
  • Save balasankarc/6a78e92cc1866ce9d7ec0cedd20f344a to your computer and use it in GitHub Desktop.
Save balasankarc/6a78e92cc1866ce9d7ec0cedd20f344a to your computer and use it in GitHub Desktop.
archiver () {
name=$1
original=$2
result=$(curl "http://web.archive.org/save/"$original | grep "var redirUrl" | awk '{print $4}' | sed -e 's/";//g' | sed -e 's/"/http:\/\/web.archive.org/g')
echo "[$name]($original),[Archived]($result)"
}
alias archiveit=archiver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment