confuseddddd
Programmer
Need to create a script that will take the current user id and search an audit trail directory for the current date and user id (both of these are part of the file name) and then print the file.
Audit Trail Directory has file names like:
20030924_002.UUU.RPT
20030925_I01.YYY.RPT
1) How can I pull in the user id???
`date +%Y%m%d`_???.${uid}.RPT
2) Can I loop through to print the file(s)???
there could be one day being printed or one
week or one month, based on the user id.
Assuming $uid is the 3 character ID.
for $file in $PATH_TO_FILE/`date +%Y+m+d`_???.${uid}.RPT`
do
echo "Printing $file"
lp -q $LP $file
Anyone have any ideas?????