?? self-mailer.sh
字號:
#!/bin/sh# self-mailer.sh: Self-mailing scriptadr=${1:-`whoami`} # Default to current user, if not specified.# Typing 'self-mailer.sh wiseguy@superdupergenius.com'#+ sends this script to that addressee.# Just 'self-mailer.sh' (no argument) sends the script#+ to the person invoking it, for example, bozo@localhost.localdomain.## For more on the ${parameter:-default} construct,#+ see the "Parameter Substitution" section#+ of the "Variables Revisited" chapter.# ============================================================================ cat $0 | mail -s "Script \"`basename $0`\" has mailed itself to you." "$adr"# ============================================================================# --------------------------------------------# Greetings from the self-mailing script.# A mischievous person has run this script,#+ which has caused it to mail itself to you.# Apparently, some people have nothing better#+ to do with their time.# --------------------------------------------echo "At `date`, script \"`basename $0`\" mailed to "$adr"."exit 0
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -