Commit | Line | Data |
---|---|---|
361727e1 C |
1 | .TH KERMIT 1C LOCAL |
2 | .SH NAME | |
3 | kermit \- file transfer, terminal connection, character-set translation, | |
4 | and script programming | |
5 | .SH SYNOPSIS | |
6 | .B kermit | |
7 | [ options ...] [files ...] | |
8 | .SH DESCRIPTION | |
9 | .I Kermit | |
10 | is a family of file transfer, management, and communication software programs | |
11 | available for most computers and operating systems. The UNIX version of | |
12 | Kermit, called C-Kermit, supports serial connections (direct or dialed) and, | |
13 | in most UNIX implementations, also TCP/IP connections. On SunOS systems | |
14 | equipped with SunLink X.25, C-Kermit also supports X.25 connections. | |
15 | .PP | |
16 | C-Kermit's major functions are file transfer using the Kermit protocol, | |
17 | automatic dialing, terminal connection, translation of national and | |
18 | international character sets, and script programming for automated | |
19 | communications. This manual gives a brief overview of C-Kermit version | |
20 | 5A(188). C-Kermit is fully documented in the book | |
21 | .IR "Using C-Kermit" | |
22 | by Frank da Cruz and Christine M. Gianone, Digital Press, Burlington, MA, | |
23 | USA. Digital Press ISBN: 1-55558-108-0; Prentice-Hall ISBN: 0-13-037490-3. | |
24 | Price: US $34.95. In USA, call DECdirect at 1-800-344-4825, refer to order | |
25 | number EY-J896E-DP. Available: January 1993. | |
26 | .PP | |
27 | C-Kermit can be used in two "modes" -- remote and local. In remote mode, | |
28 | you connect to the UNIX system from a desktop PC, Macintosh, or workstation | |
29 | and transfer files between your desktop computer and UNIX C-Kermit. In that | |
30 | case, connection establishment (dialing, TELNET connection, etc) is handled | |
31 | by the Kermit program on your desktop computer. | |
32 | .PP | |
33 | In local mode, C-Kermit establishes a connection to another computer | |
34 | by direct serial connection, by dialing a modem, or by making a network | |
35 | connection. When used in local mode, C-Kermit gives you a terminal connection | |
36 | to the remote computer, using your actual terminal, emulator, or UNIX | |
37 | workstation window or console driver for specific terminal emulation. | |
38 | .PP | |
39 | C-Kermit also has two types of commands: the familiar UNIX-style command-line | |
40 | arguments, and an interactive dialog with prompt. Command-line arguments give | |
41 | you access to a small but useful subset of C-Kermit's features for terminal | |
42 | connection and file transfer, plus the ability to pipe files into or out of | |
43 | Kermit for transfer. | |
44 | .PP | |
45 | Interactive commands give you access to dialing, script programming, | |
46 | character-set translation, and in general, detailed control and display of all | |
47 | C-Kermit's features. Interactive commands can also be collected into command | |
48 | files or collected into macros. | |
49 | .PP | |
50 | .SH "STARTING C-KERMIT" | |
51 | .PP | |
52 | C-Kermit should be available as "kermit" somewhere in your PATH. To start | |
53 | C-Kermit simply type "kermit", possibly followed by command-line options. If | |
54 | there are no "action options" on the command line, C-Kermit starts in | |
55 | interactive mode; you will see a greeting message and then the "C-Kermit>" | |
56 | prompt. If you include action options on the command line, C-Kermit takes the | |
57 | indicated actions and then exits back to UNIX. Either way, C-Kermit | |
58 | executes the commands in its initialization file, | |
59 | .IR ".kermrc" , | |
60 | in your home directory before it executes any other commands, unless you have | |
61 | included the -Y (uppercase) command-line option, which means to skip the | |
62 | initialization file. | |
63 | .PP | |
64 | .SH "USING C-KERMIT TO TRANSFER FILES" | |
65 | .PP | |
66 | Here is a common scenario for Kermit file transfer: | |
67 | .PP | |
68 | .in +0.5i | |
69 | .ll -0.5i | |
70 | .ta +0.2i | |
71 | .ti -0.2i | |
72 | \(bu Start Kermit on local computer and establish a connection to the | |
73 | remote computer. If C-Kermit is on your local | |
74 | computer, use the sequence SET MODEM <modem-name>, SET LINE, SET SPEED, and | |
75 | DIAL <number> if you are dialing; SET LINE and SPEED for direct connections, | |
76 | SET NETWORK and SET HOST (or, for TCP/IP, simply TELNET) for network | |
77 | connections. | |
78 | ||
79 | .ti -0.2i | |
80 | \(bu SET any other necessary communication parameters, such as PARITY, | |
81 | DUPLEX, and FLOW-CONTROL. If you will be communicating with an IBM mainframe | |
82 | in line-mode (not full-screen mode), give the command DO IBM. | |
83 | ||
84 | .ti -0.2i | |
85 | \(bu Give the CONNECT command. | |
86 | ||
87 | .ti -0.2i | |
88 | \(bu Log in to the remote computer. | |
89 | ||
90 | .ti -0.2i | |
91 | \(bu Start Kermit on the remote computer, give it any desired SET commands | |
92 | for file, communication, or protocol-related parameters. If you will be | |
93 | transferring binary files, give the command SET FILE TYPE BINARY to the remote | |
94 | Kermit. | |
95 | ||
96 | .ti -0.2i | |
97 | \(bu Give the remote Kermit the SERVER command. | |
98 | ||
99 | .ti -0.2i | |
100 | \(bu Escape back to the Kermit program on your local (desktop) computer. | |
101 | If your local computer is running C-Kermit, type Ctrl-\\ c (Control-backslash | |
102 | followed by the letter 'c') (on NeXT workstations, use Ctrl-] c). If MS-DOS | |
103 | or OS/2 Kermit, use Alt-X or Ctrl-] c. Now you should see your local Kermit | |
104 | program's prompt. | |
105 | ||
106 | .ti -0.2i | |
107 | \(bu If you will be transferring binary files, give the command SET FILE | |
108 | TYPE BINARY to your local Kermit program. | |
109 | ||
110 | .ti -0.2i | |
111 | \(bu To get files from the remote computer to your local computer, use GET | |
112 | followed by the filename. Use SEND followed by the filename to put files | |
113 | from your local computer to the remote system. You may use "wildcard" | |
114 | characters such as * and ? in the filenames to specify groups of files. | |
115 | ||
116 | .ti -0.2i | |
117 | \(bu When you finish transferring files, and you need to continue your work | |
118 | on the remote remote computer, type FINISH and then CONNECT. You're now | |
119 | talking Kermit on the remote computer again. Type EXIT to get back to the | |
120 | command prompt on the remote system. At the end, logout normally from the | |
121 | remote computer. Then escape back to Kermit on your local computer, and then | |
122 | EXIT from the local Kermit program. | |
123 | ||
124 | .ti -0.2i | |
125 | \(bu If you don't need to go back to the remote computer again, type the | |
126 | BYE command to the local Kermit program. This will shut down the remote | |
127 | Kermit server and terminate (log out) your remote session. | |
128 | .ll +0.5i | |
129 | .in -0.5i | |
130 | .fi | |
131 | .PP | |
132 | .SH HELP | |
133 | .PP | |
134 | Kermit has extensive built-in help. You can find out what commands exist by | |
135 | typing ? at the beginning of a line. You can type HELP followed by the name | |
136 | of a command for information on it. For commands that take multiple | |
137 | arguments, you can type ? in the middle of the command for more information, | |
138 | and you can also use help with several arguments. E.g. SET has many different | |
139 | things you can set, like SET RECEIVE PACKET-LENGTH 1000. You can type 'SET | |
140 | ?', or 'SET RECEIVE ?', etc. 'HELP SET' talks about the 'SET' command in | |
141 | general, 'HELP SET RECEIVE talks about the SET RECEIVE options. | |
142 | .SH BACKSLASH NOTATION | |
143 | Within an interactive command, \\ is a special character to help you enter | |
144 | special quantities, or ordinary characters that would otherwise be illegal or | |
145 | hard to type. At the end of a line, \\ (backslash) (or - dash) makes the next | |
146 | line a continuation of the current line. Other than that, the character | |
147 | following the \\ identifies what the thing is: | |
148 | .nf | |
149 | ||
150 | % A user-defined simple (scalar) variable such as \\%a or \\%1 | |
151 | & an array reference such as \\&a[3] | |
152 | $ an environment variable such as \\$(TERM) | |
153 | v (or V) a built-in variable such as \\v(time) | |
154 | f (or F) a function such as \\fSubstring(\\%a,3,2) | |
155 | d (or D) a decimal (base 10) number (1 to 3 digits, 0..255) such as \\d27 | |
156 | o (or O) an octal (base 8) number (1 to 3 digits, 0..377) such as \\o33 | |
157 | x (or X) a hexadecimal (base 16) number (2 digits, 00..ff) like \\x1b | |
158 | \\ the backslash character itself | |
159 | b (or B) the BREAK signal (OUTPUT command only) | |
160 | l (or L) a Long BREAK signal (OUTPUT only) | |
161 | a decimal digit (a 1-3 digit decimal number) such as \\27 | |
162 | anything else: following character taken literally. | |
163 | ||
164 | .fi | |
165 | Note that numbers turn into the character with that binary code, so | |
166 | you can use \\7 for a bell, \\13 for carriage return, \\10 for linefeed. | |
167 | ||
168 | .SH COMMANDS | |
169 | .PP | |
170 | You can use upper- or lower case for commands. Either one will work (but | |
171 | remember that UNIX filenames are case-sensitive). Also, you can abbreviate | |
172 | commands as long as the abbreviation matches only one possibility. This is a | |
173 | summary of C-Kermit's commands. For more information on each, see | |
174 | .IR "Using C-Kermit" , | |
175 | or type HELP and then the command name. | |
176 | .nf | |
177 | .in 0 | |
178 | .ll 80 | |
179 | .ta 15 | |
180 | ||
181 | ; Introduce a full-line or trailing comment (also #). | |
182 | ! Run a system command or enter system command interpreter. | |
183 | ASK Prompt the user, store user's reply in a variable. | |
184 | ASKQ Like ASK, but, but doesn't echo (useful for passwords). | |
185 | ASSIGN Assign an evaluated string to a variable or macro. | |
186 | BYE Terminate and log out a remote Kermit server. | |
187 | C Special abbreviation for CONNECT. | |
188 | CD Change Working Directory (also, CWD). | |
189 | CHECK See if a particular feature is built in. | |
190 | CLEAR Clear communication device input buffer. | |
191 | CLOSE Close a log or other local file. | |
192 | COMMENT Introduce a full-line comment. | |
193 | CONNECT Establish a terminal connection to a remote computer. | |
194 | DECLARE Declare an array. | |
195 | DECREMENT Subtract one (or other number) from a variable. | |
196 | DEFINE Define a variable or macro. | |
197 | DELETE Delete a file or files. | |
198 | DIAL Dial a telephone number. | |
199 | DIRECTORY Display a directory listing. | |
200 | DISABLE Disallow access to selected features during server operation. | |
201 | DO Execute a macro ("DO" can be omitted). | |
202 | E-PACKET Send an Error packet. | |
203 | ECHO Display text on the screen. | |
204 | ELSE Used with IF. | |
205 | ENABLE Allow access to selected features during server operation. | |
206 | END A command file or macro. | |
207 | EXIT Exit from the program, closing all open files and devices. | |
208 | FINISH Instruct a remote Kermit server to exit, but not log out. | |
209 | FOR Execute commands repeatedly in a counted loop. | |
210 | G Special abbreviation for GET. | |
211 | GET Get files from a remote Kermit server. | |
212 | GETOK Ask question, get Yes or No answer, set SUCCESS or FAILURE. | |
213 | GOTO Go to a labeled command in a command file or macro. | |
214 | HANGUP Hang up the phone or network connection. | |
215 | HELP Display a help message for a given command. | |
216 | IF Conditionally execute the following command. | |
217 | INCREMENT Add one (or other number) to a variable. | |
218 | INPUT Match characters from another computer against a given text. | |
219 | INTRO Print a brief introduction to C-Kermit. | |
220 | LOG Open a log file -- debugging, packet, session, transaction. | |
221 | MAIL Send a file to other Kermit, to be delivered as e-mail. | |
222 | MSEND Send a list of files to the other Kermit. | |
223 | MSLEEP Sleep for given number of milliseconds. | |
224 | OPEN Open a local file for reading or writing. | |
225 | O Special abbreviation for OUTPUT. | |
226 | OUTPUT Send text to another computer. | |
227 | PAD Command for X.25 PAD (SunLink X.25 only) | |
228 | PAUSE Do nothing for a given number of seconds. | |
229 | PING Check status of remote TCP/IP host. | |
230 | PRINT Print a file on a printer. | |
231 | PUSH Invoke host system interactive command interpreter. | |
232 | PWD Display current working directory. | |
233 | QUIT Same as EXIT. | |
234 | R Special abbreviation for RECEIVE. | |
235 | READ Read a line from a local file. | |
236 | RECEIVE Passively wait for files to arrive. | |
237 | REDIAL The the most recently DIALed number again. | |
238 | REINPUT Reexamine text previously received from another computer. | |
239 | REMOTE Issue file management commands to a remote Kermit server. | |
240 | RENAME Change the name of a file. | |
241 | RETURN Return from a user-defined function. | |
242 | RUN Run a program or system command. | |
243 | S Special abbreviation for SEND. | |
244 | SCRIPT Execute a UUCP-style login script. | |
245 | SEND Send files. | |
246 | SERVER Begin server operation. | |
247 | SET Set various parameters. | |
248 | SHOW Display values of SET parameters. | |
249 | SLEEP Sleep for given number of seconds. | |
250 | SPACE Display current disk space usage. | |
251 | STATISTICS Display statistics about most recent file transfer. | |
252 | STOP Stop executing macro or command file, return to prompt. | |
253 | SUSPEND Suspend Kermit (use only if shell supports job control!). | |
254 | TAKE Execute commands from a file. | |
255 | TELNET Make a TCP/IP TELNET connection to a remote network host. | |
256 | TRANLATE Translate a file's character set. | |
257 | TRANSMIT Upload a file with no error checking. | |
258 | TYPE Display a file on the screen. | |
259 | VERSION Display the program version number on the screen. | |
260 | WAIT Wait for the specified modem signals. | |
261 | WHILE Execute commands repeatedly while a condition is true. | |
262 | WRITE Write text to a local file. | |
263 | XIF Extended IF command. | |
264 | XLATE Synonym for TRANSLATE. | |
265 | XMIT Synonym for TRANSMIT. | |
266 | .ll | |
267 | .in | |
268 | .fi | |
269 | .SH PARAMETERS YOU CAN SET | |
270 | Here are some of the parameters you can change with the SET command. Note | |
271 | that many of them require further specification, e.g. there are several | |
272 | RECEIVE parameters. So commands using SET RECEIVE | |
273 | look like "SET RECEIVE PACKET-LENGTH 1000". For parameters like that, | |
274 | the possible second words are listed below them. | |
275 | .nf | |
276 | .in 0 | |
277 | .ll 80 | |
278 | .ta 15 | |
279 | ||
280 | ATTRIBUTES Turn Attribute packet processing on or off. | |
281 | BLOCKSIZE, CHARACTER-SET, DATE, DISPOSITION, | |
282 | LENGTH, OS-SPECIFIC, SYSTEM-ID, ALL | |
283 | BLOCK-CHECK Level of file transfer error detection. | |
284 | BUFFERS Size of send and receive packet buffers. | |
285 | CARRIER Treatment of carrier on terminal connections. | |
286 | CASE Treatment of alphabetic case in string comparisons. | |
287 | COMMAND BYTESIZE used between C-Kermit and your keyboard and screen. | |
288 | COUNT For counted loops. | |
289 | DEBUG Log or display debugging information. | |
290 | DELAY How long to wait before sending first packet. | |
291 | DIAL Parameters related to dialing. | |
292 | DIAL-COMMAND, DIRECTORY, DISPLAY, HANGUP, INIT-STRING, | |
293 | KERMIT-SPOOF, MNP-ENABLE, SPEED-MATCHING, TIMEOUT | |
294 | DUPLEX Specify which side echoes during CONNECT. | |
295 | ESCAPE Prefix for "escape commands" during CONNECT. | |
296 | FILE Set transfer file parameters: | |
297 | BYTESIZE, CHARACTER-SET, COLLISION, DISPLAY, | |
298 | INCOMPLETE, NAMES, TYPE | |
299 | FLOW-CONTROL Communication line full-duplex flow control. | |
300 | HANDSHAKE Communication line half-duplex turnaround character. | |
301 | HOST Specify network host name. | |
302 | INPUT Control behavior of INPUT command. | |
303 | KEY Key mapping and macros for use in CONNECT mode. | |
304 | LANGUAGE Enable language-specific character-set translations. | |
305 | LINE Serial communication device name. | |
306 | MACRO Control aspects of macro execution. | |
307 | MODEM-DIALER Type of modem-dialer on communication line. | |
308 | NETWORK Network type, e.g. TCP/IP, X.25. | |
309 | PAD X.25 X.3 PAD parameters (SunLink X.25 only). | |
310 | PARITY Communication line character parity. | |
311 | PROMPT The C-Kermit program's interactive command prompt. | |
312 | RECEIVE Parameters for inbound packets. | |
313 | END-OF-PACKET, PACKET-LENGTH, PAD-CHARACTER, PADDING | |
314 | START-OF-PACKET, TIMEOUT | |
315 | RETRY Packet retransmission limit. | |
316 | SEND Parameters for outbound packets. | |
317 | See RECEIVE for subparameters. Normally you set only | |
318 | RECEIVE parameters. SEND parameters come automatically | |
319 | from the Kermit on the other end. | |
320 | SERVER Parameters for server operation. | |
321 | TIMEOUT | |
322 | SESSION-LOG File type for session log, text or binary. | |
323 | SPEED Communication line speed, e.g. 2400, 9600. | |
324 | TAKE Control aspects of TAKE file execution. | |
325 | TERMINAL Terminal parameters: | |
326 | BYTESIZE, CHARACTER-SET, CR-DISPLAY, ECHO, | |
327 | LOCKING-SHIFT, NEWLINE-MODE | |
328 | TRANSFER File transfer parameters: | |
329 | CHARACTER-SET, LOCKING-SHIFT | |
330 | TRANSMIT Control aspects of TRANSMIT command execution: | |
331 | ECHO, EOF, FILL, LINEFEED, LOCKING-SHIFT, PAUSE, PROMPT | |
332 | UNKNOWN Specify handling of unknown character sets. | |
333 | WINDOW File transfer packet window size. | |
334 | X.25 Specify X.25 connection parameters (SunLink X.25 only). | |
335 | .in | |
336 | .ll | |
337 | .SH "MACROS AND VARIABLES" | |
338 | C-Kermit allows macros and variables. A macro is a command | |
339 | that you define, composed of one or more other C-Kermit commands. | |
340 | A typical macro is a list of Kermit commands, separated | |
341 | by commas. For example: | |
342 | .nf | |
343 | ||
344 | define sun set speed 9600, set parity none, set duplex full,- | |
345 | set flow xon/xoff | |
346 | ||
347 | .fi | |
348 | You call a macro by using its name, just like normal commands. You can also | |
349 | call them using the DO command. If you have given the DEFINE command above | |
350 | (or have it in your .kermrc file), then you can type SUN or DO SUN to execute | |
351 | all the commands in the definition. | |
352 | .PP | |
353 | C-Kermit also lets you define variables. Normal variables look like \\%i, | |
354 | where i is a single letter. The alphabetic case doesn't matter. \\%a and | |
355 | \\%A are the same. Like macros, they are defined by DEFINE or ASSIGN. All | |
356 | values are strings. DEFINE gives a variable a fixed value. ASSIGN computes a | |
357 | value and assigns it to the variable. To see the difference, look at | |
358 | .nf | |
359 | ||
360 | def \\%a Monday | |
361 | def \\%b Today is \\%a | |
362 | assign \\%c Today is \\%a | |
363 | def \\%a Tuesday | |
364 | echo \\%b | |
365 | echo \\%c | |
366 | ||
367 | .fi | |
368 | This will print "Today is Tuesday" then "Today is Monday". The difference is | |
369 | that when defining \\%c, the \\%a is evaluated at the time of the definition, | |
370 | whereas when defining \\%b, the variable name \\%a itself is put in the | |
371 | definition. It isn't evaluated until the echo \\%b. | |
372 | .PP | |
373 | There are also arrays, which use \\& instead of \\%. They are declared by | |
374 | DECLARE, e.g. DECLARE \\&A[100]. Elements are referenced with subscripts, | |
375 | which may themselves be variables, and act like simple variables, e.g. | |
376 | .nf | |
377 | ||
378 | DEFINE \\&A[3] Tuesday | |
379 | ||
380 | .fi | |
381 | You can destroy the array by making it zero size, DECLARE \\&A[0]. | |
382 | The first element of an array is [1]. | |
383 | .PP | |
384 | Macros have normal names. No \\. You call them by using the name like a | |
385 | command. If you put additional words on the same line as the macro | |
386 | invocation, they become arguments. Inside the macro, you can refer to the | |
387 | arguments as \\%1, \\%2, etc. For example: | |
388 | .nf | |
389 | ||
390 | C-Kermit>define bsend set file type binary, send \\%1 | |
391 | C-Kermit>define tsend set file type text, send \\%1 | |
392 | C-Kermit>bsend kermit | |
393 | C-Kermit>tsend kermit.doc | |
394 | ||
395 | .fi | |
396 | The number of arguments supplied can be referred to as \\v(argc). If you call | |
397 | another macro from a macro, the new one gets its own set of arguments, which | |
398 | do not interfere with the previous set. | |
399 | .PP | |
400 | There are a number of built-in variables, which are referred to by \\v(name). | |
401 | They cannot be changed. Type SHOW VARIABLES for a complete list. | |
402 | .nf | |
403 | ||
404 | \\v(argc) number of arguments in current macro | |
405 | \\v(args) number of program command-line arguments | |
406 | \\v(cmdfile) name of current command file, if any | |
407 | \\v(cmdlevel) current command level | |
408 | \\v(cmdsource) where command are currently coming from, macro, file, etc. | |
409 | \\v(count) current COUNT value | |
410 | \\v(cpu) CPU type C-Kermit was built for | |
411 | \\v(date) date as 8 Feb 1992 | |
412 | \\v(day) day of week | |
413 | \\v(directory) current/default directory | |
414 | \\v(exitstatus)current EXIT status (0 = good, nonzero = something failed) | |
415 | \\v(filespec) filespec given in most recent SEND/RECEIVE/GET command | |
416 | \\v(fsize) size of file most recently transferred | |
417 | \\v(home) home directory | |
418 | \\v(host) computer host name | |
419 | \\v(input) current INPUT buffer contents | |
420 | \\v(inchar) character most recently INPUT | |
421 | \\v(incount) how many characters arrived during last INPUT | |
422 | \\v(line) current communications device, set by LINE or HOST | |
423 | \\v(local) 0 if in remote mode, 1 if in local mode | |
424 | \\v(macro) name of currently executing macro, if any | |
425 | \\v(ndate) Current date as 19920208 (yyyymmdd) | |
426 | \\v(ntime) Current local time in seconds since midnight | |
427 | \\v(platform) Specific machine and/or operating system | |
428 | \\v(program) Name of this program ("C-Kermit") | |
429 | \\v(return) Most recent RETURN value | |
430 | \\v(speed) Current speed, if known, or "unknown" | |
431 | \\v(status) 0 or 1 (SUCCESS or FAILURE of previous command) | |
432 | \\v(system) UNIX | |
433 | \\v(time) time as 13:45:23 (hh:mm:ss) | |
434 | \\v(ttyfd) file descriptor of current communication device | |
435 | \\v(version) numeric version of Kermit | |
436 | .fi | |
437 | .PP | |
438 | There are builtin functions, invoked as \\Fname(args). Type SHOW FUNCTIONS for | |
439 | a complete list. | |
440 | .nf | |
441 | ||
442 | \\Fcharacter(arg) convert numeric arg to character | |
443 | \\Fcode(char) numeric code for character | |
444 | \\Fcontents(v) return current definition of variable | |
445 | \\Fdefinition(m) return current definition of macro | |
446 | \\Feval(expr) evaluate arithmetic expression | |
447 | \\Fexecute(m a) execute macro "m" with parameters "a" | |
448 | \\Ffiles(f) number of files matching file spec | |
449 | \\Findex(a1,a2,a3) position of string a2 in a1, starting at pos a3 | |
450 | \\Flength(arg) length of the string "arg" | |
451 | \\Fliteral(arg) copy argument literally, no evaluation | |
452 | \\Flower(arg) convert to lower case | |
453 | \\Flpad(text,n,c) left pad text to length n with char c | |
454 | \\Fmax(a1,a2) max of two numbers | |
455 | \\Fmin(a1,a2) min of two numbers | |
456 | \\Fnextfile() next file name from list in last \\Ffiles | |
457 | \\Frepeat(a1,a2) repeat a1 a2 times | |
458 | \\Freverse(arg) reverse character in arg | |
459 | \\Fright(a1,a2) rightmost a2 characters of string a1 | |
460 | \\Frpad(text,n,c) right pad text to length n with char c | |
461 | \\Fsubstr(a1,a2,a3) substring of a1, starts at a2, length a3 | |
462 | \\Fupper(arg) convert to upper case | |
463 | ||
464 | .fi | |
465 | Eval allows the following operators in the expression. The expression | |
466 | can contain variables. Precedences are shown as numbers, 1 is highest | |
467 | precedence, 6 is lowest. | |
468 | .in +.2i | |
469 | .nf | |
470 | .ta \w'n @ n 'u +\w'5 'u | |
471 | ||
472 | ( ) 1 parentheses | |
473 | n ! 2 factorial | |
474 | ~ n 3 logical NOT | |
475 | - n 4 negative | |
476 | n ^ n 4 power | |
477 | n * n 5 times | |
478 | n / n 5 division | |
479 | n % n 5 modulus | |
480 | n & n 5 logical AND | |
481 | n + n 6 plus | |
482 | n - n 6 minus | |
483 | n | n 6 logical OR | |
484 | n # n 6 exclusive OR | |
485 | n @ n 6 greatest common divisor | |
486 | ||
487 | .fi | |
488 | .SH "OPTIONS AND COMMAND LINE ARGUMENTS" | |
489 | .PP | |
490 | Typically you run Kermit without any arguments, and use a combination | |
491 | of .kermrc and interactive commands. However it is possible to put options on | |
492 | the command line. This is normally used for scripts. In this case, Kermit is | |
493 | invoked as follows: | |
494 | .nf | |
495 | .ll 80 | |
496 | ||
497 | kermit [-x arg [-x arg]...[-yyy]..]] | |
498 | ||
499 | -x is an option requiring an argument, | |
500 | -y an option with no argument. | |
501 | .ta 15 | |
502 | ||
503 | Actions: | |
504 | -s files send files | |
505 | -s - send files from stdin | |
506 | -r receive files | |
507 | -k receive files to stdout | |
508 | -x enter server mode | |
509 | -f finish remote server | |
510 | -g files get remote files from server (quote wildcards) | |
511 | -a name alternate file name, used with -s, -r, -g | |
512 | -c connect (before file transfer), used with -l and -b | |
513 | -n connect (after file transfer), used with -l and -b | |
514 | ||
515 | Settings: | |
516 | -l line communication line device | |
517 | -j host network host name | |
518 | -q quiet during file transfer | |
519 | -i binary file transfer | |
520 | -b bps line speed, e.g. 1200 | |
521 | -m name modem type | |
522 | -p x parity, x = e,o,m,s, or n | |
523 | -t half duplex, xon handshake | |
524 | -e n receive packet length | |
525 | -v n window size | |
526 | -w write over files | |
527 | ||
528 | Other: | |
529 | -y name alternate init file name | |
530 | -Y Skip init file | |
531 | -d log debug info to debug.log | |
532 | -S Stay, don't exit, after action | |
533 | -C "cmds" Interactive-mode commands | |
534 | ||
535 | If no action command is included, enter interactive dialog. | |
536 | .ll | |
537 | .in | |
538 | .fi | |
539 | .SH FILES | |
540 | $HOME/.kermrc \fIKermit\fR initialization commands | |
541 | .PD | |
542 | .SH AUTHORS | |
543 | Frank da Cruz, Columbia University, with contributions from hundreds of | |
544 | other volunteer programmers all over the world; "man page" mostly courtesy of | |
545 | Charles Hedrick, Rutgers University. | |
546 | .SH SEE ALSO | |
547 | .TP | |
548 | Frank da Cruz and Christine Gianone | |
549 | .IR "Using C-Kermit" , | |
550 | Digital Press, Burlington, MA, USA (1993) | |
551 | .TP | |
552 | Frank da Cruz, | |
553 | .IR "Kermit, A File Transfer Protocol" , | |
554 | Digital Press, Bedford, MA, USA (1987) | |
555 | .SH DIAGNOSTICS | |
556 | The diagnostics produced by | |
557 | .I Kermit | |
558 | itself are intended to be self-explanatory. In addition, every command | |
559 | returns a SUCCESS or FAILURE status that can be tested by IF FAILURE or | |
560 | IF SUCCESS. In addition, the program itself returns an exit status code of | |
561 | 0 upon successful operation or nonzero if any of various operations failed. | |
562 | .SH BUGS | |
563 | See recent issues of the Info-Kermit digest (on BITNET/EARN, the Internet, or | |
564 | the comp.protocols.kermit newsgroup on Usenet) for discussion, or the files | |
565 | ckcker.bwr and ckuker.bwr, for a list of bugs. Report | |
566 | bugs via e-mail to Info-Kermit-Request@columbia.edu or KERMIT@CUVMA.BITNET. | |
567 | Subscribe to Info-Kermit by sending e-mail to I$KERMIT@CUVMA.BITNET or | |
568 | I$KERMIT@CUVMA.CC.COLUMBIA.EDU containing the text "subscribe i$kermit" | |
569 | followed by your name. | |
570 | .br |