Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo Привет, `whoami`
- cnt=0
- trap 'cnt=$(( $cnt + 1 ))' SIGINT
- while [ $cnt -lt 3 ]
- do
- read q
- if [[ "$q" =~ .*"Найди мне".* ]]
- then
- search=${q#*Найди мне }
- search=${search// /+}
- echo 'https://www.google.com/search?q='$search
- fi
- if [[ "$q" =~ .*"Погода".* ]]
- then
- search=${q#Погода }
- curl "http://wttr.in/$search"
- fi
- if [[ "$q" =~ .*"Время".* ]]
- then
- echo Сейчас `date`
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement