Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- [ -z "$1" ] && echo 'Usage: !temp city_name' && exit 1
- wget "https://p.ya.ru/$1" -qO - | awk '{
- match($0,/<span class="city [^>]*>(.*)<\/span>/,a)
- if(a[1]) {
- gsub("<[^>]*>", "", a[1]) # Strip html tags
- gsub("&[^;]*;", "", a[1]) # Strip html entities like as a
- print "В "a[1]
- }
- }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement