by ikornaselur · 6y ago · 0 comments
I even spent a time to make a simple function in my shell to cut off the output after today and accept a location name
w () {
curl -s "wttr.in/$1?M1q" | head -17
}
and then I can just do w london
to get the weather for London today.But, like most of the functions/aliases I create, I can't remember the last time I used it (except couple of times when I see someone talking about it and I remember about it)
w () {
curl -s "wttr.in/${*// /+}"
}
to make it work with places that have spaces in their name. E.g. w new yorkw() { ( IFS=+; curl wttr.in/"$*";); }
EDIT: I just realised that "they" is actually you!
w () {
curl -s "wttr.in/$1?M1qF"
}