您的位置:首页 > 运维架构 > Linux

linux : if (&&) and mail 用法

2009-05-22 12:23 363 查看
// with email Body and attachement

(uuencode $OUTFILE attachedfilename ; echo "email body") | mail -s "subject here ..." $EMAILRCP

//email body is null ,no attachment

echo | mail -s "No file extracted for onholding inquirenow forms on $DATE, please check ..." $EMAIL1

//sending multiple attachements

(uuencode $REPORTFILNAME1
$REPORTFILNAME1

;uuencode $REPORTFILNAME2
$REPORTFILNAME2
)

| mail -s "Onholding Inquirenow Form Info" $EMAIL1

//multiple attachments and mail body

(uuencode $PA_LITE_HOUSEKEEP_FILE PA_LITE_HOUSEKEEP_LIST_$today.csv ; uuencode $PA_LITE_HOUSEKEEP_LOG PALiteAHousekeep.log ; echo "Pls see attached files.") | mail -s "PA Lite Housekeep Status Report $today" $EMAIL1

//If &&

if [ -s $REPORTFILNAME1 ] && [ -s $REPORTFILNAME2 ]

if (test -f $REPORTFILNAME1 && test -f $REPORTFILNAME2)

if (!reply && !acquireResult)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: