waitfor.1

来自「通讯程序源码」· 1 代码 · 共 45 行

1
45
字号
.TH waitfor L.SH NAMEwaitfor \- wait for a string to appear on the stdin.SH SYNOPSIS.B waitfor[.B \-n].B string.SH DESCRIPTION.I Waitforreads the standard input and returns a 0 if the string argument isfound, returns a 1 if the strings did not appear within the allottedtime, or returns a \-1 on error.  If the string is found,.I waitforreturns immediately..PP.I Waitforis designed to be used by.I Pcomminside a shell script for automating keyboard input to log a user onto aremote system..PPThe.I \-noption is used to specify the length of time in seconds to wait.  Thedefault is 10 seconds..SH EXAMPLE.nf.RS 5# wait 5 seconds for the login promptwaitfor \-5 login:# test the exit code of the waitfor commandif [ $? \-eq 0 ]then.RS 5# send my user IDecho egray.REfi.RE.fi.SH "SEE ALSO"pcomm(1), pcomm_cmd(1), matches(1), Pcomm Reference Manual

⌨️ 快捷键说明

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