Last active 1701093299

rune revised this gist 1701093299. Go to revision

1 file changed, 5 insertions

expandurl.sh(file created)

@@ -0,0 +1,5 @@
1 + expandurl ()
2 + {
3 + [[ -z "$1" ]] && echo "Usage: expandurl <short url>" && return 1;
4 + curl -s -IL "$1" | awk '/[Ll]ocation/ { print $2 }'
5 + }
Newer Older