I wrote the following rather primitive alias:
alias unshorten="curl -k -v -I $1 2>&1 | grep -i '< location' | cut -d ' ' -f 3"
It's meant to unshorten the shortened link and then print out the real link without visiting the site itself. But when I try it out with a link it throws out this:
cut: 'https://testlinkhere.com': No such file or directory
What am I doing wrong?
$1
) to a bash alias like that - see How to pass parameters to an alias? – steeldriver Nov 27 '22 at 14:59alias unshorten='curl -w "%{redirect_url}\n" -sIo /dev/null'
– Stéphane Chazelas Nov 27 '22 at 15:27