add --gattini flag
This commit is contained in:
parent
778bf9df9d
commit
5526094029
1 changed files with 10 additions and 2 deletions
|
@ -1,5 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
match=$(date +"%a" | tr '[:upper:]' '[:lower:]' | sed 's/mon/lunedi/;s/tue/martedi/;s/wed/mercoledi/;s/thu/giovedi/;s/fri/venerdi/;s/sat/sabato/;s/sun/domenica/')
|
||||
|
||||
day=$(date +"%a" | tr '[:upper:]' '[:lower:]' | sed 's/mon/lunedi/;s/tue/martedi/;s/wed/mercoledi/;s/thu/giovedi/;s/fri/venerdi/;s/sat/sabato/;s/sun/domenica/')
|
||||
curl -s "http://immaginibuongiorno.it" | grep "$day" | grep -oP "(?<=src=\").*(?=\")" | cut -d '"' -f 1 | shuf -n 1
|
||||
case $1 in
|
||||
-g|--gattini)
|
||||
match="gatto\|gattin\|micett"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -s "http://immaginibuongiorno.it" | grep "$match" | grep -oP "(?<=src=\").*(?=\")" | cut -d '"' -f 1 | shuf -n 1
|
||||
|
|
Loading…
Reference in a new issue