ckuker.nr
来自「早期freebsd实现」· NR 代码 · 共 571 行 · 第 1/2 页
NR
571 行
COMMAND BYTESIZE used between C-Kermit and your keyboard and screen.COUNT For counted loops.DEBUG Log or display debugging information.DELAY How long to wait before sending first packet.DIAL Parameters related to dialing. DIAL-COMMAND, DIRECTORY, DISPLAY, HANGUP, INIT-STRING, KERMIT-SPOOF, MNP-ENABLE, SPEED-MATCHING, TIMEOUT DUPLEX Specify which side echoes during CONNECT.ESCAPE Prefix for "escape commands" during CONNECT.FILE Set transfer file parameters: BYTESIZE, CHARACTER-SET, COLLISION, DISPLAY, INCOMPLETE, NAMES, TYPEFLOW-CONTROL Communication line full-duplex flow control.HANDSHAKE Communication line half-duplex turnaround character.HOST Specify network host name.INPUT Control behavior of INPUT command. KEY Key mapping and macros for use in CONNECT mode.LANGUAGE Enable language-specific character-set translations.LINE Serial communication device name.MACRO Control aspects of macro execution.MODEM-DIALER Type of modem-dialer on communication line.NETWORK Network type, e.g. TCP/IP, X.25.PAD X.25 X.3 PAD parameters (SunLink X.25 only).PARITY Communication line character parity. PROMPT The C-Kermit program's interactive command prompt.RECEIVE Parameters for inbound packets. END-OF-PACKET, PACKET-LENGTH, PAD-CHARACTER, PADDING START-OF-PACKET, TIMEOUT RETRY Packet retransmission limit.SEND Parameters for outbound packets. See RECEIVE for subparameters. Normally you set only RECEIVE parameters. SEND parameters come automatically from the Kermit on the other end. SERVER Parameters for server operation. TIMEOUT SESSION-LOG File type for session log, text or binary.SPEED Communication line speed, e.g. 2400, 9600.TAKE Control aspects of TAKE file execution.TERMINAL Terminal parameters: BYTESIZE, CHARACTER-SET, CR-DISPLAY, ECHO, LOCKING-SHIFT, NEWLINE-MODETRANSFER File transfer parameters: CHARACTER-SET, LOCKING-SHIFTTRANSMIT Control aspects of TRANSMIT command execution: ECHO, EOF, FILL, LINEFEED, LOCKING-SHIFT, PAUSE, PROMPTUNKNOWN Specify handling of unknown character sets.WINDOW File transfer packet window size. X.25 Specify X.25 connection parameters (SunLink X.25 only)..in.ll.SH "MACROS AND VARIABLES"C-Kermit allows macros and variables. A macro is a commandthat you define, composed of one or more other C-Kermit commands.A typical macro is a list of Kermit commands, separatedby commas. For example:.nf define sun set speed 9600, set parity none, set duplex full,- set flow xon/xoff.fiYou call a macro by using its name, just like normal commands. You can alsocall them using the DO command. If you have given the DEFINE command above(or have it in your .kermrc file), then you can type SUN or DO SUN to executeall the commands in the definition..PPC-Kermit also lets you define variables. Normal variables look like \\%i,where i is a single letter. The alphabetic case doesn't matter. \\%a and\\%A are the same. Like macros, they are defined by DEFINE or ASSIGN. Allvalues are strings. DEFINE gives a variable a fixed value. ASSIGN computes avalue and assigns it to the variable. To see the difference, look at.nf def \\%a Monday def \\%b Today is \\%a assign \\%c Today is \\%a def \\%a Tuesday echo \\%b echo \\%c.fiThis will print "Today is Tuesday" then "Today is Monday". The difference isthat when defining \\%c, the \\%a is evaluated at the time of the definition,whereas when defining \\%b, the variable name \\%a itself is put in thedefinition. It isn't evaluated until the echo \\%b..PPThere are also arrays, which use \\& instead of \\%. They are declared byDECLARE, e.g. DECLARE \\&A[100]. Elements are referenced with subscripts,which may themselves be variables, and act like simple variables, e.g..nf DEFINE \\&A[3] Tuesday.fiYou can destroy the array by making it zero size, DECLARE \\&A[0].The first element of an array is [1]..PPMacros have normal names. No \\. You call them by using the name like acommand. If you put additional words on the same line as the macroinvocation, they become arguments. Inside the macro, you can refer to thearguments as \\%1, \\%2, etc. For example:.nf C-Kermit>define bsend set file type binary, send \\%1 C-Kermit>define tsend set file type text, send \\%1 C-Kermit>bsend kermit C-Kermit>tsend kermit.doc.fiThe number of arguments supplied can be referred to as \\v(argc). If you callanother macro from a macro, the new one gets its own set of arguments, whichdo not interfere with the previous set..PPThere are a number of built-in variables, which are referred to by \\v(name).They cannot be changed. Type SHOW VARIABLES for a complete list..nf \\v(argc) number of arguments in current macro \\v(args) number of program command-line arguments \\v(cmdfile) name of current command file, if any \\v(cmdlevel) current command level \\v(cmdsource) where command are currently coming from, macro, file, etc. \\v(count) current COUNT value \\v(cpu) CPU type C-Kermit was built for \\v(date) date as 8 Feb 1992 \\v(day) day of week \\v(directory) current/default directory \\v(exitstatus)current EXIT status (0 = good, nonzero = something failed) \\v(filespec) filespec given in most recent SEND/RECEIVE/GET command \\v(fsize) size of file most recently transferred \\v(home) home directory \\v(host) computer host name \\v(input) current INPUT buffer contents \\v(inchar) character most recently INPUT \\v(incount) how many characters arrived during last INPUT \\v(line) current communications device, set by LINE or HOST \\v(local) 0 if in remote mode, 1 if in local mode \\v(macro) name of currently executing macro, if any \\v(ndate) Current date as 19920208 (yyyymmdd) \\v(ntime) Current local time in seconds since midnight \\v(platform) Specific machine and/or operating system \\v(program) Name of this program ("C-Kermit") \\v(return) Most recent RETURN value \\v(speed) Current speed, if known, or "unknown" \\v(status) 0 or 1 (SUCCESS or FAILURE of previous command) \\v(system) UNIX \\v(time) time as 13:45:23 (hh:mm:ss) \\v(ttyfd) file descriptor of current communication device \\v(version) numeric version of Kermit.fi.PPThere are builtin functions, invoked as \\Fname(args). Type SHOW FUNCTIONS fora complete list..nf \\Fcharacter(arg) convert numeric arg to character \\Fcode(char) numeric code for character \\Fcontents(v) return current definition of variable \\Fdefinition(m) return current definition of macro \\Feval(expr) evaluate arithmetic expression \\Fexecute(m a) execute macro "m" with parameters "a" \\Ffiles(f) number of files matching file spec \\Findex(a1,a2,a3) position of string a2 in a1, starting at pos a3 \\Flength(arg) length of the string "arg" \\Fliteral(arg) copy argument literally, no evaluation \\Flower(arg) convert to lower case \\Flpad(text,n,c) left pad text to length n with char c \\Fmax(a1,a2) max of two numbers \\Fmin(a1,a2) min of two numbers \\Fnextfile() next file name from list in last \\Ffiles \\Frepeat(a1,a2) repeat a1 a2 times \\Freverse(arg) reverse character in arg \\Fright(a1,a2) rightmost a2 characters of string a1 \\Frpad(text,n,c) right pad text to length n with char c \\Fsubstr(a1,a2,a3) substring of a1, starts at a2, length a3 \\Fupper(arg) convert to upper case.fiEval allows the following operators in the expression. The expressioncan contain variables. Precedences are shown as numbers, 1 is highestprecedence, 6 is lowest..in +.2i.nf.ta \w'n @ n 'u +\w'5 'u( ) 1 parenthesesn ! 2 factorial ~ n 3 logical NOT- n 4 negativen ^ n 4 powern * n 5 timesn / n 5 divisionn % n 5 modulusn & n 5 logical ANDn + n 6 plusn - n 6 minusn | n 6 logical ORn # n 6 exclusive ORn @ n 6 greatest common divisor.fi.SH "OPTIONS AND COMMAND LINE ARGUMENTS".PPTypically you run Kermit without any arguments, and use a combinationof .kermrc and interactive commands. However it is possible to put options onthe command line. This is normally used for scripts. In this case, Kermit isinvoked as follows:.nf.ll 80 kermit [-x arg [-x arg]...[-yyy]..]] -x is an option requiring an argument, -y an option with no argument..ta 15Actions: -s files send files -s - send files from stdin -r receive files -k receive files to stdout -x enter server mode -f finish remote server -g files get remote files from server (quote wildcards) -a name alternate file name, used with -s, -r, -g -c connect (before file transfer), used with -l and -b -n connect (after file transfer), used with -l and -bSettings: -l line communication line device -j host network host name -q quiet during file transfer -i binary file transfer -b bps line speed, e.g. 1200 -m name modem type -p x parity, x = e,o,m,s, or n -t half duplex, xon handshake -e n receive packet length -v n window size -w write over filesOther: -y name alternate init file name -Y Skip init file -d log debug info to debug.log -S Stay, don't exit, after action -C "cmds" Interactive-mode commandsIf no action command is included, enter interactive dialog..ll.in.fi.SH FILES$HOME/.kermrc \fIKermit\fR initialization commands.PD.SH AUTHORSFrank da Cruz, Columbia University, with contributions from hundreds ofother volunteer programmers all over the world; "man page" mostly courtesy ofCharles Hedrick, Rutgers University..SH SEE ALSO.TPFrank da Cruz and Christine Gianone.IR "Using C-Kermit" ,Digital Press, Burlington, MA, USA (1993).TPFrank da Cruz,.IR "Kermit, A File Transfer Protocol" ,Digital Press, Bedford, MA, USA (1987).SH DIAGNOSTICSThe diagnostics produced by.I Kermititself are intended to be self-explanatory. In addition, every commandreturns a SUCCESS or FAILURE status that can be tested by IF FAILURE orIF SUCCESS. In addition, the program itself returns an exit status code of0 upon successful operation or nonzero if any of various operations failed..SH BUGSSee recent issues of the Info-Kermit digest (on BITNET/EARN, the Internet, orthe comp.protocols.kermit newsgroup on Usenet) for discussion, or the filesckcker.bwr and ckuker.bwr, for a list of bugs. Reportbugs via e-mail to Info-Kermit-Request@columbia.edu or KERMIT@CUVMA.BITNET.Subscribe to Info-Kermit by sending e-mail to I$KERMIT@CUVMA.BITNET orI$KERMIT@CUVMA.CC.COLUMBIA.EDU containing the text "subscribe i$kermit"followed by your name..br
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?