Thanks for ur replies.
I got that issue solved with the help of outfilename=$(find . -type f -mtime 0 | tr '\n' ',');
I am facing another issue with this find.....
Here is my program
# Environmental set up
# Initialize error code
if [ "$envSet" = "$2" ]
# Set batch environment
. $1/jobs/setBatchEnv.sh $1
echo "file name ---------"$filename
echo "BATCH_HOME ---------"$BATCH_HOME
echo "3 ---------"$3
#Frame the output file name
if [ "$filename" != "" ]
echo "Inside IF"
#if ZipReports.sh executed, then the filename of the zip will be taken from that
outfilename = $filename;
echo "Inside ELSE"
#if ZipReports.sh not executed, then the filename will be the list of files that are last modified today
outfilename=$(find . -type f -mtime 0 | tr '\n' ',');
# Call the EmailReportsBatch.java program
$JAVA_HOME/java -Xmx1024m -Djava.awt.headless=true \
batch.EmailReportsBatch > $LOG_DIR/EmailReportsBatch.log
# Check if java command fails
if test ! $? -eq 0
When i execute this pgm i am getting the outfilename value correctly. But when it is invoked from main shell(this main shell will generate the reports and then call this shell to mail all the generated reports) this outfilename is giving me one value less than what it is supposed to give. That is if 3 files are modified today, it is giving only 2 file names. Any suggestion why this is happening? But when BATCH_HOME, $3 values are echoed they show the same results...