BACKRUSH  À¯´Ð½º¸í·É  ´ÙÀ½  ÀÚ·á½Ç  Ascii Table   ¿ø°ÝÁ¢¼Ó  ´Þ·Â,½Ã°£   ÇÁ·Î¼¼½º   ½©
ÁöÇÏö³ë¼±   RFC¹®¼­   SUN FAQ   SUN FAQ1   C¸Þ´º¾ó   PHP¸Þ´º¾ó   ³Ê±¸¸®   ¾Æ½ºÅ°¿ùµå ¾ÆÀÌÇǼ­Ä¡

±Û¾´ÀÌ: ½© Cat mail Á¶È¸¼ö: 4729


#!/bin/ksh

###
## catmail
##
## Reads files and sends them via email.
## Takes a file name as an argument on the command line.
## To send multiple files: Comment out FILES lines,
## uncomment lines and list files in $DATFILE.

##
## Submitter: Gideon Rasmussen
## Submitter Email: gideon@infostruct.net


MAILADD=foo@bar.com
FILE=$1
SRVNM=`uname -n`
#DATFILE=/opt/admin/scripts/catmail.dat

if [ -z "$FILE" ]; then

echo " "
echo "Syntax: $0 [file]"
echo " "
exit 1
fi

### Uncomment out following 3 commented
### lines for multiple files read in from
### $DATFILE above
#while read -r FILE
#do
if [ -f $FILE ]; then
mail $MAILADD <<EOF

From: $0
To: $MAILADD
Subject: $FILE on $SRVNM

`cat $FILE`

EOF

else
echo "$FILE : File not found."
fi

#done < $DATFILE

exit 0


°ü·Ã±Û : ¾øÀ½ ±Û¾´½Ã°£ : 2002/08/28 17:39 from 210.121.188.5

  Kick ¸ñ·Ïº¸±â »õ±Û ¾²±â Áö¿ì±â ÀÀ´ä±Û ¾²±â ±Û ¼öÁ¤ /etc/services ÆÄÀÏ ¼öÁ¤ÈÄ Àû¿ëÇÏ±â  
BACKRUSH  À¯´Ð½º¸í·É  ´ÙÀ½  ÀÚ·á½Ç  Ascii Table   ¿ø°ÝÁ¢¼Ó  ´Þ·Â,½Ã°£   ÇÁ·Î¼¼½º   ½©
ÁöÇÏö³ë¼±   RFC¹®¼­   SUN FAQ   SUN FAQ1   C¸Þ´º¾ó   PHP¸Þ´º¾ó   ³Ê±¸¸®   ¾Æ½ºÅ°¿ùµå ¾ÆÀÌÇǼ­Ä¡