#curl

rainerhgw@diasp.org

I do not understand #curl

man #curl
```
[…]
-s, --silent
Silent or quiet mode. Don't show progress meter or error mes-
sages. Makes Curl mute. It will still output the data you ask
for, potentially even to the terminal/stdout unless you redirect
it.

          Use  -S,  --show-error  in  addition  to  this option to disable
          progress meter but still show error messages.

[…]

Let's go:

~$ curl -SL "https://icanhazip.com" | grep nixversteh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 35 100 35 0 0 219 0 --:--:-- --:--:-- --:--:-- 233
~$

Without `-s` curl displays the progress meter.
Let's try with `-s`:

~$ curl -sSL "https://icanhazip.com" | grep nixversteh
~$

As expected.
But what the hell is this?

~$ curl -sSL "https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$(curl icanhazip.com)" | grep nixversteh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 35 100 35 0 0 347 0 --:--:-- --:--:-- --:--:-- 384
~$
```
There is the (unwanted) progress meter.
Can some kind person explain that?

vtel57@diasp.org

Well, a couple weeks back my xfce4-weather-plugin decided to no longer function. I'm getting No Data notifications when I launch it. Oh, darn. Usually, an update of the software solves the issue, but Slackware has been a bit slow to push out an upgrade for this app; probably they are more focused on Slackware 15 at the moment.

Anyway, I posted about this on an already existing thread at LinuxQuestions.org/Slackware; a member there suggested that I just use this in CLI:

$ curl wttr.in

And that was pretty fine, but I adjusted somewhat. Instead of using it from the command line, I created a URL launcher in my sidebar panel which, when clicked, opens a tab in the default browser with the weather output...

Pretty neato, huh? You can also choose your locale and other modifiers to add to the link. In my case I chose a local int'l airport near my home and used the /u modifier to display in Imperial measures not Metric. YAY!

More info at the site Github site: https://github.com/chubin/wttr.in

#Linux #Slackware #Weather_apps #Curl #CLI