pipeto.sample-hold

来自「这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易」· SAMPLE-HOLD 代码 · 共 44 行

SAMPLE-HOLD
44
字号
#!/bin/rc# create a /tmp for here documentsrfork enbind -c /mail/tmp /tmpKEY=whocaresUSER=kenRECIP=$1MBOX=$2PF=/mail/box/$USER/_patternTMP=/mail/tmp/mine.$pidBIN=/bin/upasD=/mail/fs/mbox/1# save and parse the mail file{sed '/^$/,$ s/^From / From /'; echo} > $TMPupas/fs -f $TMP# if we like the source# or if the subject contains a valid token# then deliver the mail and allow all the addressesif( $BIN/list check $PF $D/from $D/sender $D/replyto ){	$BIN/deliver $RECIP $D/from $MBOX < $D/raw	$BIN/list add $PF $D/from $D/to $D/cc $D/sender	rm $TMP	exit 0}switch($status){case *!match*	echo `{date} dropped $RECIP From `{cat $D/replyto} >> /mail/box/$USER/_bounced >[2] /dev/null	rm $TMP	exit 0}# don't recognize the sender so hold the message$BIN/deliver $RECIP $D/from /mail/box/$USER/_held < $D/rawrv=$statusrm $TMPexit $status

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?