a=5
echo "*/$aMin * * * * bash /etc/init.d/ckDskCheck.sh"
When I try to run the following code, it displays properly
*/5 * * * * bash /etc/init.d/ckDskCheck.sh
But when I try to assign the result using the following code to the variable and print it out, it displays as this:
a=5
cronSen=`echo "*/$a * * * * bash /etc/init.d/ckDskCheck.sh"`
echo $cronSen
Result:
So I try to escape the asterisk by
cronSen=`echo "\*/$a \* \* \* \* bash /etc/init.d/ckDskCheck.sh"`
But it still doesn't work. Why? How can I fix this?
$cronSen
when you echo it. – Calcaneusinit.d
script from Cron, though? Either it's in the wrong location or else you are doing something moderately funky. – Vinosity