📄 pcomm_cmd.1
字号:
.if n .ds rq "".el .ds rq ''.if n .ds lq "".el .ds lq ``.TH pcomm_cmd L.SH NAMEpcomm_cmd \- send a command to Pcomm.SH SYNOPSIS.B pcomm_cmd[ command ] [ options ] [ arguments ].SH DESCRIPTION.I Pcomm_cmdis a Pcomm support program. It is used from inside shell scripts to accessPcomm commands, such as.I \*(lqpcomm_cmd send xmodem junk\*(rqfor sending the file \*(lqjunk\*(rq to the remote using the xmodem filetransfer protocol..PPThe following command line options are supported..TPSET BAUD [ 300 | 1200 | 2400 | 4800 | 9600 | 19200 | 38400 ]Set the baud rate for the current connection. This feature is for usewith the DIAL MANUAL command, since the baud rate information in thedialing directory entries overrides this value. .TPSET PARITY [ EVEN | ODD | NONE ]Set the parity for the current connection. For use with the DIAL MANUALcommand..TPSET DATA_BITS [ 7 | 8 ]The number of data bits (word length) used for the current connection.For use with the DIAL MANUAL command..TPSET STOP_BITS [ 1 | 2 ]The number of stop bits for the current connection. For use with theDIAL MANUAL command..TPSET DUPLEX [ HALF | FULL ]Set the duplex mode (local echo). The HALF option is used if the remotesystem does not echo characters as they are typed..TPSET AUX filenameUse the argument as the auxiliary file associated with the currentconnection. Since chaining of scripts is not supported, this featurewould only be used to set the TTY or modem..TPSET HOT_KEY [1-256]Change the decimal value of the \*(lqhot key\*(rq to this value..TPSET ASCII_HOT stringChange the ASCII representation of the hot key to the given argument. Thelength of the string must be no more than 4 characters wide..TPSET FLOW_CTRL [ XON/XOFF | NONE ]Set the flow control between the local and remote systems to either XON/XOFFor NONE..TPSET CR_IN [ CR | CR/LF ]Translate in-comming carriage returns carriage return followed by a linefeed, or pass the carriage return through unchanged..TPSET CR_OUT [ CR | CR/LF ]Translate out-going carriage returns to CR or CR/LF..TPSET LOGFILE filenameChange the name of the default log file. For use with the DATA_LOG command..TPSET DUMPFILE filenameChange the name of the screen dump file. For use with the SCREEN_DUMP command..TPSET STRIP [ YES | NO ]Should the in-comming data be stripped to 7 bits?.TPSET LOCAL_ECHO [ YES | NO ]Should data be shown on the screen during ASCII uploads?.TPSET EXPAND [ YES | NO ]Should blank lines be \*(lqexpanded\*(rq to a line with a single space?For use only during ASCII uploads..TPSET CR_DELAY [ 0 | 100 | 150 ]Set the delay for the carraige returns for ASCII uploads..TPSET PACE [ YES | NO ]Should the entire upload be artifically slowed down? For use during ASCIIuploads..TPSET CR_UP [ NONE | ADD_LF | STRIP ]Controls the translation of carraige returns during ASCII uploads..TPSET LF_UP [ NONE | ADD_CR | STRIP ]Controls the translation of line feeds during ASCII uploads..TPSET TIMER [5-150]Controls the timer (in seconds) that detects the end of an ASCII download..TPSET CR_DN [ NONE | ADD_LF | STRIP ]Controls the translation of carraige returns during ASCII downloads..TPSET LF_DN [ NONE | ADD_CR | STRIP ]Controls the translation of line feeds during ASCII downloads..TPQUERY TTY_NAMEReturns the name of the current TTY in use or NONE..TPQUERY MODEM_NAMEReturns the name of the current modem in use or NONE..TPIF CONNECTEDReturns a 1 if Pcomm is currently connected to a remote, otherwise a 0..TPIF LOG_STATUSReturns a 1 if the data logging feature is turned on, otherwise 0..TPIF PRINTER_STATUSReturns a 1 if the printer is turned on, otherwise 0..TPDIAL [ MANUAL phone_number ] entry_numberDial an entry from the dialing directory. The MANUAL option is used tooptionaly dial a phone number without the use of the dialing directory.DIAL returns after 1 attempt. A return code of 1 means a connectionwas made..ft IThe dial function will not be allowed to switch TTY ports. If the currentTTY is not suitable (i.e. not attached to the correct modem), the scriptwill be terminated..ft.TPREDIAL entry_numberSimilar to the DIAL command, but 10 attempts are made..TPEXITHang up the phone and exit from Pcomm..TPCLEAR_SCREENClear the screen..TPCHG_DIR directoryChange the current working directory to the given directory..TPHANG_UPHang up the phone, but remain in Pcomm..TPPRINTER [ ON | OFF ]Control the logging of data to the printer..TPMODEM_BREAKSend a modem break to the remote system. This is typically used totell the remote to switch to a different baud rate..TPSEND protocol filenameSend a file to the remote. The valid protocols are XMODEM, XMODEM_1K,MODEM7, YMODEM, YMODEM_G, ASCII, EXT_1, EXT_2, and EXT_3..TPRECEIVE protocol filenameReceive a file from the remote. The valid protocols are XMODEM,XMODEM_1K, MODEM7, YMODEM, YMODEM_G, ASCII, EXT_1, EXT_2, and EXT_3..TPSCREEN_DUMPDump the current contents of the screen to the DUMPFILE. If the filealready exists, the new contents are appended to the file..TPDATA_LOG [ ON | OFF ]Control logging of the terminal session to the LOGFILE. If the filealready exists, the new contents are appended to the file..SH EXAMLESThe following is an example of a shell script that will dial a system,log a user on, transfer a file called "junk" using xmodem, log out, andexit Pcomm..PP.nf.RS 5# dial entry number 23 in my dialing directorypcomm_cmd dial 23# wait for the login promptwaitfor ogin:# send my user idecho egray# wait for the password promptwaitfor assword:# send my passwdecho abcdefg# wait for terminal type promptwaitfor vt100# echo my typeecho vt100# wait for a Unix promptwaitfor $# start up an xmodem file transferecho sx junk# wait for the sx command to say its readywaitfor nowsleep 1# do a file transferpcomm_cmd receive xmodem junk# wait for the promptwaitfor $# log me outecho "^D"sleep 1# exit pcommpcomm_cmd exit.fi.RE.SH "SEE ALSO"pcomm(1), waitfor(1), matches(1), Pcomm Reference Manual
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -