B / Y / U / S
HOME À¥ È£½ºÆà µµ¸ÞÀÎ ¸Å´º¾ó °í°´Áö¿ø ¼³Á¤Á¤º¸ °èÁ¤½Åû 2024-12-27 Friday 
À¥ È£½ºÆÃ
# °øÁö »çÇ×
# ÀÚÁÖ ¹¯´Â Áú¹®
# Áú¹®°ú ´äº¯
# °¡ÀÔ ¹®ÀÇ
Ä¿¹Â´ÏƼ
# ÀÚÀ¯°Ô½ÃÆÇ
# ¸®´ª½ºÆÁ
# ¾ÆÀÌÅ¥ Å×½ºÆ®
# ³»È¨ ¼Ò°³
# °Ö·¯¸®
# ÀÚ·á½Ç

  ¸®´ª½ºÆÁ  Go Unix Power Tools Online Book Go Bash Guide
Read No. 131 article 2002-03-25 17:51:18
NickName   Ç®ºñ´©
Subject   ÁöÁ¤ÇÑ ½Ã°£¿¡ ¸ÞÀÏ º¸³»±â..
#1/bin/bash

# ÁöÁ¤ÇÑ ½Ã°£¿¡ ÷ºÎÆÄÀÏ ¸ÞÀÏ º¸³»´Â ½ºÅ©¸³Æ® 

dateis=$(date|awk '{print $1}')                 # ¿äÀÏÀ» ºÒ·¯¿È  
timeis=$(date|awk '{print $4}'|cut -c1-2)       # ÇöÀçÀÇ ½Ã°£À» ºÒ·¯¿È 
fileis="/root/c/$1"                             # º¸³¾ ÆÄÀÏÀÇ À§Ä¡
limit=22                                        # Á¦Çѽð£
sendtime=2200                                   # º¸³¾½Ã°£(Á¦Çѽ𣿡 ºÐ
´ÜÀ§Ãß°¡)
title="¸®Æ÷Æ®_19611925_¼ÕÈñÅÂ_B¹Ý_8Á¶"          # ¸ÞÀÏ Á¦¸ñ
#mailadd="lovecell77 at yahoo.co.kr sontina at chollian.net"   # º¸³¾ ¸ÞÀÏ ÁÖ
¼Ò (¿©·¯°÷ º¸³¾¶§´Â ÇÑÄ­¾¿ ¶ç¿ì¸é µÊ)
mailadd="lovecell77 at yahoo.co.kr sontina at chollian.net 
tankboi at dongguk.edu"   # º¸³¾ ¸ÞÀÏ ÁÖ¼Ò (¿©·¯°÷ º¸³¾¶§´Â ÇÑÄ­¾¿ ¶ç¿ì¸é 
µÊ)

echo " ·¹Æ÷Æ® Á¦Ãâ" > /tmp/contents                        # º¸³¾ ¸ÞÀÏ ³»
¿ë
echo " ==================================" >> /tmp/contents      # º¸³¾ 
¸ÞÀÏ ³»¿ë
echo " Çйø: 19611925" >> /tmp/contents
echo " À̸§: ¼ÕÈñÅÂ" >> /tmp/contents
echo >> /tmp/contents
echo " ·¹Æ÷Æ® Á¦Ãâ ÇÕ´Ï´Ù" >> /tmp/contents

uuencode $fileis 19611925_\(¼ÕÈñÅÂ_B_8\).c > /tmp/data.txt
cat /tmp/contents >> /tmp/data.txt
rm -rf /tmp/contents

echo "date is $dateis , time is $timeis"         # ÇöÀçÀÇ ¿äÀÏ°ú ½Ã°£À» 
Ç¥½Ã 
if [ -f $fileis ]; then                          # ¸¸¾à ÇØ´ç ÆÄÀÏÀÌ ÀÖ´Ù
¸é
        if [ $dateis = "Mon" ] && (( $timeis < $limit )) ; then       # 
¿ù¿äÀÏÀÌ°í Á¦ÇÑ ½Ã°£ ÀÌÀüÀ϶§
                echo "mail -s ""$title"" $mailadd < /tmp/data.txt " 
> /tmp/mailsend.tmp
                at $sendtime < /tmp/mailsend.tmp # º¸³¾½Ã°£¿¡ ¸ÞÀÏÀ» º¸³»
µµ·Ï ¿¹¾à
                rm -rf /tmp/mailsend.tmp
                atq                              # at ÀÛ¾÷ ÇÁ·Î¼¼½º º¸¿©
ÁÖ±â
        else    # ¿ù¿äÀÏÀÌ ¾Æ´Ï°Å³ª, Á¦Çѽð£ ÀÌÈÄÀ϶§
                mail -s "$title" $mailadd < /tmp/data.txt
        fi
else
        echo "##### usage : mailten filename ######"
fi
~
Regist Addr [ 192.168.0.2 ] ¸ñ·Ïº¸±â À­±Û ¾Æ·§±Û
Á¤±ÔÇ¥Çö½Ä [ »ó¼¼ °Ë»ö ]
Page Loading [ 0.02 Sec ] SQL Time [ 0 Sec ]

Copyleft 1999-2024 by JSBoard Open Project
Theme Designed by IDOO And follow GPL2

°³ÀÎÁ¤º¸ Ãë±Þ¹æħ ÀÌ¿ë ¾à°ü »çÀÌÆ® ¸Ê ¾îµå¹Î °ü¸®