![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is rtc still needed today? | sparkysun | UNIX for Dummies Questions & Answers | 2 | 03-28-2008 05:47 AM |
| How to list all the files which are not generated today | redlotus72 | UNIX for Dummies Questions & Answers | 2 | 10-05-2007 06:27 AM |
| How to capture input files from GETOPT ? | bh_hensem | Shell Programming and Scripting | 1 | 05-30-2007 11:31 PM |
| Need to capture spooled print files | serware | UNIX for Advanced & Expert Users | 1 | 12-01-2001 11:36 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
capture all the today files
My folder (e.g. /opt/successlog/) creates many files thru cron jobs everyday. I would like to retreive all the today files in this folder into a log file. How to do this for KSH? Thanks!
|
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
#3
|
|||
|
|||
|
Thanks Vino! It works great.
|
|
#4
|
|||
|
|||
|
You can also check a different option for find command -
Quote:
Code:
EDIDIR=${LMS_EDI_IN}/${COMP}/${DIR}
FTPDIR=${LMS_VAR}/ftp/${COMP}/${DIR}
EDIINLIST=/app/lms/common/logs/admin/systemhealth/checkdailyinbounce_{$COMP}_${DIR}.log
find ${EDIDIR} -name "*.${EXT}" -daystart -mtime 0 -type f -exec ll {} \; > $EDIINLIST
find ${FTPDIR} -name "*.${EXT}" -daystart -mtime 0 -type f -exec ll {} \; >> $EDIINLIST
if [ ! -s $EDIINLIST ]
then
echo "No ${REPNAME} file(s) received by LMS" | mailx -s "No inbound ${REPNAME} files for ${COMPNAME} received by LMS today " $MAILDL
else
echo File Found
cat $EDIINLIST
fi
|
|||
| Google The UNIX and Linux Forums |