forgive me for my ignorance there is -atime -ctime -mtime I think its -ctime
find -ctime 1 -name \*.csv -print
-mtime match ending of csv and are exactly 1 day old, the trouble of this is it works in 24 hour period so files less than 24 hours but still yesterday would not show
this would be a simpler way of doing things since and would not care about changes in file name formatting for future proofing.
cd pathtcsv;
d=`date -d "1 day ago" +"%d"`
d=$d find . -type f -name \*.csv -ctime 1 -exec ls -l {} \;|awk '$7 ~ d'|awk '{print $NF}'| awk '{ print substr( $0, length($0) - 1, length($0) ) }'
# D = $d which is set as yesterday's date, it finds files from yseterday that have csv ending it then does an ls, pipes into awk and checks out value 7 against the date of yesterday which $7 is the date value on ls -l, it finally prints the last field and pipes into a final awk which prints the string and splits from char position to char position which is what you wanted ? you need to figure out what chars you need here is another example of above for char positions of 0 to 10.
d=$d find . -type f -ctime 1 -name \*.csv -exec ls -l {} \;|awk '$7 ~ d'|awk '{print $NF}'| awk '{ print substr( $0, 0, 10)}'
hhmmsss?