shell中使用mail发邮件的时候正文换行的问题
我在shell中使用mail来发邮件的时候,在正文中要写入多行数据,下面是部分代码,但是收到邮件后,发现第二行没有顶格写,不知道是什么原因,
filename1=$(ls /pt88/pt845/interface/ist88prd/bhgl/IDD-WWCN-FINGL0015.PEOPLESOFT3.*.TXT)
sendoutmessage="Successfully uploaded ${filename1} to ${FTPSERVER}"
sendouttime=$(date '+%Y-%m-%d %H:%M:%S')
echo "${sendouttime}
${sendoutmessage}" | mail -s "GL report for ISTC had been uploaded to BH successfully" tonyhf@cn.ibm.com