OK, I know next to nothing about scripting in unix, and at the moment I don't have access to a unix environment...
We have an application that generates a text report file which is later printed. The format is this:
bbtptcYYMMDDSSCC.txt (year/month/day/second/check digit)
I want a script to scan the directory these files live in (lets call it XYZ_REPORT) for the most recent of these files (bbtptc*) and append it to a file, ie BBT_EXPORT.txt. Would this script suffice? And if not, what does it need?
#!/bin/ksh
cd $XYZ_REPORT
cp `ls -t bbptc* | head -1` bbptc_extract
Thanks in advance!