croccio,
watch this.
catTIME, catMinute, etc, it's all value.
if you need do some operation with it, you can use $catMinute or $catTIME , etc.
for example:
if you need "AND", do this:
catMinute=`busybox uptime | awk '{print $1}' | sed 's,^...,,' | sed '1,$s/...$//'`
halftime="30"
fulltime="00"
if [ $catMinute -eq $halftime ] && [ $catMinute -eq $fulltime ]
then
showQ "" "Bingo Bongo" 2
else
showQ "" "Ooopss" 2
fi
or this:
catMinute=`date +%M`
halftime="30"
fulltime="00"
if [ $catMinute -eq $halftime ] && [ $catMinute -eq $fulltime ]
then
showQ "" "Bingo Bongo" 2
else
showQ "" "Ooopss" 2
fi
and if You need "OR", do this:
catMinute=`date +%M`
halftime="30"
fulltime="00"
if [ $catMinute -eq $halftime ] || [ $catMinute -eq $fulltime ]
then
showQ "" "Bingo Bongo" 2
else
showQ "" "Ooopss" 2
fi
or this:
catMinute=`busybox uptime | awk '{print $1}' | sed 's,^...,,' | sed '1,$s/...$//'`
halftime="30"
fulltime="00"
if [ $catMinute -eq $halftime ] || [ $catMinute -eq $fulltime ]
then
showQ "" "Bingo Bongo" 2
else
showQ "" "Ooopss" 2
fi
---
p.s.: "AND" do double check the value (first and second need to match, for show Bingo Bongo), "OR" do single check (first or second match, for show Bingo Bongo)
p.p.s.: also you can date --help to see variable output format of data. (for example date +%d - day of the month, and other)
Сообщение отредактировал Zorge.R - 11.3.2010, 18:04
watch this.
catTIME, catMinute, etc, it's all value.
if you need do some operation with it, you can use $catMinute or $catTIME , etc.
for example:
if you need "AND", do this:
Код
catMinute=`busybox uptime | awk '{print $1}' | sed 's,^...,,' | sed '1,$s/...$//'`
halftime="30"
fulltime="00"
if [ $catMinute -eq $halftime ] && [ $catMinute -eq $fulltime ]
then
showQ "" "Bingo Bongo" 2
else
showQ "" "Ooopss" 2
fi
or this:
Код
catMinute=`date +%M`
halftime="30"
fulltime="00"
if [ $catMinute -eq $halftime ] && [ $catMinute -eq $fulltime ]
then
showQ "" "Bingo Bongo" 2
else
showQ "" "Ooopss" 2
fi
and if You need "OR", do this:
Код
catMinute=`date +%M`
halftime="30"
fulltime="00"
if [ $catMinute -eq $halftime ] || [ $catMinute -eq $fulltime ]
then
showQ "" "Bingo Bongo" 2
else
showQ "" "Ooopss" 2
fi
or this:
Код
catMinute=`busybox uptime | awk '{print $1}' | sed 's,^...,,' | sed '1,$s/...$//'`
halftime="30"
fulltime="00"
if [ $catMinute -eq $halftime ] || [ $catMinute -eq $fulltime ]
then
showQ "" "Bingo Bongo" 2
else
showQ "" "Ooopss" 2
fi
---
p.s.: "AND" do double check the value (first and second need to match, for show Bingo Bongo), "OR" do single check (first or second match, for show Bingo Bongo)
p.p.s.: also you can date --help to see variable output format of data. (for example date +%d - day of the month, and other)
Сообщение отредактировал Zorge.R - 11.3.2010, 18:04