📄 waitfor.1
字号:
.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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -