Posts filed under 'shell scripts'

basic lesson

if [ -e abc.log ]; then
    echo “abc.log exist”
fi
-e check exist
-d check directory exist

Add comment January 5, 2008

sendmail and mailx

cat ${OUT_FILE} | /usr/sbin/sendmail -f “${FRM_MAIL}” ${TO_MAIL}
FRM_MAIL=sender
TO_MAIL=recipient
OUT_FILE=content    <– subject is inside the content eg. “Subject: Testing”
/usr/bin/mailx -r ${FRM_MAIL} -s “${MSG}” ${TO_MAIL} < ${OUT_FILE}
FRM_MAIL=sender
TO_MAIL=recipient
MSG=subject
OUTFILE_=content

Add comment January 5, 2008


Calendar

November 2009
M T W T F S S
« Jan    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Posts by Month

Posts by Category