yesterday="2010-06-23 00:00:00"
today="2010-06-24 00:00:00"
mywhere="lastupdate>'$yesterday' and lastupdate<'$today'"
mysqldump $param ticket --no-create-info --where=\"$mywhere\"
The last line of above shell script would return something like this...
+ mysqldump -uroot -d --compact ahmadpur ticket --no-create-info --where="lastupdate>'2010-06-23 00:00:00' and lastupdate<'2010-06-24 00:00:00'"
mysqldump: Couldn't find table: "00:00:00'"
There is an error in the mysqldump command execution. But if I copy paste the same line, it runs successfully. Do I need to escape the spaces in shell script output? if yes, how?