Another problem to do with (I suspect) dates not be treated as dates.
My script has this block at the front to set some variables, so that I can eventually run it from a regular cron job:
if [ $startmonth = 12 ];then
Idea being to put the start & end dates into variables “startdate” and “enddate” to restrict the report range.
If I run:
rt list "queue = 'myqueue' and created > '$startdate'"
It returns results correctly.
If I run:
rt list “queue = ‘myqueue’ and created < ‘$enddate’”
It says “No matches found”.
If I manually enter:
rt list "queue = 'myqueue' and created < '1/2/2011'"
Then it works correctly.
root@sirius:/ # echo $startdate $enddate
They’re obviously different - “startdate” has a month of “01” whilst “enddate” is “2”. But startdate works, and enddate not…
Is there some way I need to format the resulting variable differently so that it knows it’s a date and is treated as such?
Far Edge Technology
p. 02 84251400
m. 0403 393309