I am trying to change the date format for the following:
YESTER=`TZ=aaa24 date +%b" "%d | sed 's/0/ /'`
TraceList=$(ls -ltR /pdt/logs | grep "$YESTER" | awk '{print $9}')
CMD2=$(find /disk/dan/dansFiles/pass/logs/$TList -name cmd\* -prune)
what I am trying to do in the above script is look for all files created yesterday...however when I do an ls -ltR the files have a date in this format:
"Jul 5"
with two spaces as opposed to
"Jul 5".
How can I get the yesterday variable to preserve the whitespace?