I have a series of around 20 files as my program output. The final line of my script gets the no of files and the file list for the present day. The no of files shoudl be printed first and the files for today must be printed in the next line. Ialso understood that echo -e must be used for with \n. However I get multiple errors for this.
Can you get me an exact syntax for the line which has \n? Please find below my script.
set -x
cd alt/mystudies
a=`ls -ltr | wc -l`
echo $a
Today=`date '+%Y%m%d'`
echo $Today
b=`ls P* | grep $Today`
echo $b
echo -e The no of files for United dated `date` is $a and the files are below \n $b | mailx -s " United files " venkidhadha@yahoo.com
m
had to get back to this echo -e after a long time. I am using the general discussed below.
however my output has the -e options in it. Not sure of the reason.
cut -f6 -d '/' newfile.csv >> /piccare/incoming/United/import/newfiles.csv
(echo -e "The total files in the directory is \t $c \n The files for today is \t $d";uuencode newfiles.csv newfiles.csv) | mailx -s " test " venkita.ve