I want to use math expression in IF clause – something like this:
#!/bin/sh
now=`date +%H%M`
if [ $now % 5 -gt 0 ] ; then
exit
fi
perl ...
What is a correct syntax for that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
or
Note that you do not really need an if clause at all, and you could do