You would first floor-divide the ctime (number of seconds since year 1970) by 60 to obtain the number of minutes. Then you would get the modulo remainder from dividing that by 2, where 1 would indicate an odd number and 0 would indicate even. If you want it the other way around, use (1-result) instead of (result).

//echo -a $calc( ($ctime // 60) % 2) => $asctime

And for the last digit, since you're asking for a range size of 10 instead of odd-vs-even, the modulo would be 10 instead of 2

//echo -a $calc( ($ctime // 60) % 10) => $asctime

Last edited by maroon; 27/01/20 02:47 PM.