Follow

#!/bin/sh

# Follow the provided short URL and show each location redirect in the
# chain. Usage: follow http://short.url/12345

HOP=$1
while [ -n "$HOP" ]
do
printf "%s\n" "$HOP"
HOP=$( curl -Is "$HOP" | dos2unix | sed -n 's/^[Ll]ocation: //p' )
done

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!