📄 00000004.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: Linxs (红楼-学习工作创业-忙!!!), 信区: Linux <BR>标 题: 一个有趣的脚本:Hello.sh <BR>发信站: BBS 水木清华站 (Sat Oct 21 21:18:25 2000) <BR> <BR>#!/bin/bash <BR># This script is writen by linxs <BR># You can run it when your machine start up <BR>while [ : ] ; do <BR> timenow=$( date | awk ' { print $2 $3 $4}'|awk -F: '{printf "%s:%s", $1, $2}') <BR> oldwhonline=$(echo $whonline) <BR> whonline=$( who | awk '{ print $3 $4 $5,$1,$2}' ) <BR> set $whonline <BR># echo "********************************************" <BR># echo "the who on line now is: $*" <BR># echo <BR># echo "the old who on line is: $oldwhonline" <BR># echo $timenow <BR> <BR> while [ "$1" != "" ];do <BR># echo "compare $3 with $oldwhonline" <BR># echo $mylog "?" "$mywho"|awk -F? '{ print match($2,$1) }' <BR> newlog=$(echo "$3""?""$oldwhonline" | awk -F? '{print match($2,$1)}' ) <BR># echo "newlog" $newlog <BR> <BR> if [ "$newlog" = 0 ]; then <BR>#: echo "time is :$1 , name is $2, tty is $3 " <BR> $(echo "Welcome,Linxs' Script say hello to You!" | write $2 $3 ) <BR> fi <BR> shift;shift;shift <BR> done <BR># sleep 1 <BR>done <BR>exit 1 <BR> <BR> <BR>-- <BR> 曾忆美人相伴, 红袖添香把盏; <BR> <BR> 年少无知纨绔, 只为生多蹊跷。 <BR> <BR> <BR>※ 来源:·BBS 水木清华站 smth.org·[FROM: 166.111.162.3] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -