📄 sample
字号:
:## This is a sample Bourne shell script to log a user onto a remote system.# Things to remember:# 1) Script files should have permissions of 700, to prevent others# from gaining access to your passwords to remote systems.# 2) The return codes for waitfor are: 0=success, 1=timed out, and# -1=error.#echo ""try=0# loop until donewhile truedo # wait 5 seconds for the login prompt waitfor -5 ogin: # test the exit code of the waitfor command if [ "$?" -eq 0 ] then # send my user ID and exit the loop echo "egray" break fi # increment the number of attempts try=`expr $try + 1` # test to see if we should give up if [ "$try" -eq 5 ] then exit 1 fi # send a modem break and loop again pcomm_cmd modem_break echo ""done# wait 5 seconds for the password promptwaitfor -5 assword:# test the return code from waiforif [ "$?" -eq 0 ]then # send my password (you're crazy if you think that's my real password) echo "abcdefg"else exit 1fi# return to Pcommexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -