I just stumbled over an interesting article “Check Tiny URLs” on Tiny-URLs prüfen - GNU/Linux.ch (in German) .
Shortened URLs are especially popular if you have little space for transmission, e.g. in microblogging services.
There you will find short URLs created with a URL shortener, such as tinyurl.com or t1p.de.
These services create a mapping of the shortened URL to the actual URL.
The problem with this is that you don’t see where the shortened URL actually shows. If you want to be sure where the short URL leads,
you can use a simple command in the terminal. Take this shortened URL as an example: GNU/Linux.ch. Don’t worry, you can click on it; she points to gnulinux.ch.
To check the shortened URL, you copy it and open a terminal. Then you call the following order:
curl -l tinyurl.com/4k43b55m
(translation via “TranslateLocally for Firefox” add-on)
That´s fine so far.
Yet the screenshot on the page shows a coloured output on the terminal whereas my output remains monochrome.
So I thought “why not piping it to
That I did with the following command:
firejail curl -l tinyurl.com/4k43b55m | bat
and indeed I got coloured output :
As you can see in the screenshot there´s the additional download-like info
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 326 0 326 0 0 686 0 --:--:-- --:--:-- --:--:-- 687
I also get that when using
cat instead of
… but NOT if I use
curl-command without piping it to bat or cat.
Hmm, I wonder what´s behind that logic.
Can anybody help me solve the riddle
Many thanks in advance and many greetings.