#!/bin/bash
#author:findyou
help(){
echo "eg: #!/bin/bash
#author:findyou
help(){
echo "eg: $0 [Subject] [address] [content_file] [file]"
echo ""
exit 1
}
if [ ! -n "$1" ] ; then
help
fi
cDate=`date +%Y%m%d`
if [ ! -n "$2" ] ; then
help
else
mail_to=$2
echo " Send Mail to ${mail_to}"
fi
if [ ! -n "$4" ] ; then
mail -s $1 ${mail_to}<$3
else
mail -s $1 -a $4 ${mail_to}<$3
fi
[Subject] [address] [content_file] [file]eg: #!/bin/bash
#author:findyou
help(){
echo "eg: $0 [Subject] [address] [content_file] [file]"
echo ""
exit 1
}
if [ ! -n "$1" ] ; then
help
fi
cDate=`date +%Y%m%d`
if [ ! -n "$2" ] ; then
help
else
mail_to=$2
echo " Send Mail to ${mail_to}"
fi
if [ ! -n "$4" ] ; then
mail -s $1 ${mail_to}<$3
else
mail -s $1 -a $4 ${mail_to}<$3
fi