• Keine Ergebnisse gefunden

SEE ALSO

Im Dokument COMMAND REFERENCE (Seite 136-173)

@{Jcsh), alias(Jcsh), bg(lcsh), break(Jcsh), cd(lcsh), chdir(Jcsh), continue(Jcsh), csh(lcsh), dirs(lcsh), echo(Jcsh), eval(lcsh), exec(Jcsh), exit(J csh), fg(l csh), glob(J csh), goto(J csh), hashstat(J csh), history(J csh), jobs(lcsh), kill(Jcsh), limit(Jcsh), logout(Jcsh), nice(Jcsh), nohup(lcsh), notify(J csh), onintr(I csh), popd(J csh), pushd(l csh), rehash( 1 csh), repeat(Jcsh), set(lcsh), setenv(Jcsh), sh(Jsh), shift(Jcsh), source(Jcsh), stop(lcsh), suspend(Jcsh), time(Jcsh), umask(Jcsh), unhash(lcsh), unalias(J csh), unlimit(J csh), unset(J csh), unsetenv(J csh), wait(J csh), which(J csh), access(2), execve(2), fork(2), killpg(2), pipe(2), sigvec(2), umask(2), setrlimit(2), wait(2), tty(4), a.out(5), environ(7).

REFERENCES

Introduction to the C-shell in the UTek Tools documentation.

14 REV SEP 1985

128

CSPLIT ( 1)

COMMAND REFERENCE

CSPLIT ( 1 )

following pieces of filename:

00: From the start of filename up to (but not including) the line option is present, csplit leaves previously created files intact.

-s Csplit normally prints the character counts for each file created. If the -s option is present, csplit suppresses the printing of all character counts.

The arguments (argl . . . argn) to csplit can be a combination of the following:

/rexp/ A file is to be created for the section from the current line up to (but not including) the line containing the regular expression rexp. The current line becomes the line containing rexp. This argument may be followed by an optional+ or - some number of lines (for example, /Page/-5). above arguments. If it follows a rexp type argument, that argument is applied num more times. If it follows lnno, the file will be split every lnno lines (num times) from that point.

129

CSPLIT ( 1 )

COMMAND REFERENCE

CSPLIT(1)

Enclose all rexp type arguments that contain blanks or other characters meaningful to the Shell in the appropriate quotes. Regular expressions may not contain embedded newlines. Csplit does not affect the original file; it is the user's responsibility to remove it.

EXAMPLES

This example creates four files, cobo/100 . .. cobo/103:

csplit -f cobol file '/procedure division/' /par5./ /par16./

After editing the split files, they can be recombined as follows:

cat cobolO[O-J] > file Note that this example overwrites the original file.

This next example would split the file at every 100 lines, up to 10,000 lines. The -k option causes the created files to be retained if there are less than 10,000 lines; however, an error message would still be printed:

csplit -k file 100 {99}

Assuming that prog.c follows the normal C coding convention of ending routines with a } (close brace) at the beginning of the line, this example will create a file containing each separate C routine (up to 21) in prog.c:

csplit -k prog.c '%main(%' '/-}/+1' {20}

RETURN VALUE [NO_ERRSJ [USAGE]

[NP _ERR]

[P_ERRJ SEE ALSO

ed(l), sh(lsh).

Command completed without error.

Incorrect command line syntax. Execution terminated.

An error occurred that was not a system error. Execution terminated.

A system error occurred. Execution terminated. See intro(2) for more information on system errors.

2

130

CTAGS(1)

COMMAND REFERENCE

CTAGS(1)

FORTRAN sources. A tags file gives the locations of specified objects (in this case functions and typedefs) in a group of files. Each line of the tags file contains the object name, the file in which it is defined, and an address specification for the object definition. Functions are searched with a pattern, typedefs with a line number. Specifiers are given in separate fields on the line, separated by blanks or tabs. Using the tags file, the editting system ex can quickly find these object definitions.

Files whose name ends in .c or .h or have no suffix are assumed to be C source files and are searched for C routine and macro definitions. Others are first examined to see if they contain any Pascal or FORTRAN routine definitions; if not, they are processed again looking for C definitions.

The tag main is treated specially in C programs. The tag formed is created by prepending M to the name of the file, with a trailing .c removed, if any, and leading pathname components also removed. This makes use of ctags practical in directories with more than one program. is usually faster to simply rebuild the tags file.)

-v An index of the form expected by vgrind (see CAVEATS) is produced on the standard output. This listing contains the function name, filename, and page number (assuming 64 line pages). Since the output will be sorted into lexicographic order, it may be desired to run printed out as an off-line readable function index.

-8

Use backward searching patterns (? ... ?).

-F Use forward searching patterns(/ ... /) (default).

REV MAR 1985 131

CTAGS(1)

COMMAND REFERENCE

CTAGS(1)

EXAMPLES

FILES

This example produces a tags file for a program made up of the source files example.c and extras.c. The entries in the tags file will have backward search for patterns:

atags -B example.a extras.a

Executing the command vi - t main will edit the file containing the routine main(), and place the cursor at the definition of that routine by searching backwards.

The following command set prints a sorted cross reference listing for the files using vgrind (see CAVEATS):

atags -v files : sort -f ) index vgrind -x index

tags Tags file for use with ex(J).

RETURN VALUE

[NO_ERRS] Command completed without error.

[USAGE] Incorrect command line syntax. Execution terminated.

[NP _WARN] An error warranting a warning message occurred.

Execution continues.

[P _WARN] A system error occurred. Execution continues. See intro(2) for more information on system errors.

[P _ERR] A system error occurred. Execution terminated. See intro(2) for more information on system errors.

CAVEATS

Recognition of functions, subroutines, and procedures for FORTRAN and Pascal is done in a very simple way. No attempt is made to deal with block structure; if you have two Pascal procedures in different blocks with the same name, only the first is tagged.

The method of deciding whether to look for C or Pascal and FORTRAN functions uses the prefix of the file, and may not always decide on the correct language.

Does not process #ifdefs (used by the preprocessor).

Should know about Pascal types. Relies on the input being well formed to detect typedefs. Use of -tx shows only the last line of typedefs.

2

132 REV MAR 1985

CTAGS(1)

COMMAND REFERENCE

CTAGS(1)

The -v option is supported for completeness. The utility vgrind may not be available on your system.

SEE ALSO

cflow(l), cxref(l), ex(l), sort(l), vi(l).

3

REV MAR 1985 133

CU(1 N)

COMMAND REFERENCE

CU(1N)

NAME

tip, cu - connect to a remote system SYNOPSIS

tip [ -v ] [ -speed ] system-name tip [ -v ] [ -speed ] phone-number

cu phone-number [ - t ] [ -s speed ] [ -a acu ] [ - I line ] [ -# ] DESCRIPTION

Tip and cu establish a full-duplex connection to another machine, giving the appearance of being logged in directly on the remote CPU. It goes without saying that you must have a login on the machine (or equivalent) to which you wish to connect. The preferred interface is tip. The cu interface is included for those people attached to the call unix command of version 7 UNIX. This manual page describes only tip.

Typed characters are normally transmitted directly to the remote machine (which does the echoing as well). A tilde C) appearing as the first character of a line is an escape signal; the following are recognized:

-(CTRL-D)-.

Drop the connection and exit (you may still be logged in on the remote machine).

-c

[name]

Change directory to name (no argument implies change to your home directory).

-! Escape to a shell; (exiting the shell will return you to tip).

Copy file from local to remote. Tip prompts for the name of a local file to transmit.

Copy file from remote to local. Tip prompts first for the name of the file to be sent, then for a command to be executed on the remote machine.

-p from [to ]

REV SEP 1985

Send a file to a remote UTek or UNIX host. The put command causes the remote UTek or UNIX system to run the command string cat > to, while tip sends it the from file. If the to file isn't specified, the from filename is used. This command is actually a UTek (UNIX) specific version of the ->command.

134

CU(1N)

COMMAND REFERENCE

CU(1N)

specified. The remote host executes the command string cat from;echo (CTRL-A)

Stop tip (only available with job control).

- { Receive a text file from the remote host using the XMODEM protocol. Must issue the appropriate command to start XMODEM transfer before giving this escape to tip. Translation is performed from CP/M file format (CR/LF) to UTek text file format (LF). If beautify is set then all bytes have the parity bit removed for consistency with UTek editors.

-} Send a text file to the remote host using the XMODEM protocol. Translation is done from UTek text file format to CP/M format as dictated by the protocol. Must issue the XMODEM command on the remote host first.

-( Receive a binary file from the remote host using the XMODEM protocol. No translation is performed.

-) Send a binary file to the remote host using the XMODEM protocol. No translations are done, the file is sent as is. The protocol dictates that the last 128 byte sector be padded with control Z characters, so this may not be suitable for transfer

CU(1 N)

COMMAND REFERENCE

CU(1N)

When tip establishes a connection it sends out a connection message to the remote system; the default value, if any, is defined in !etc/remote.

When tip prompts for an argument (for example, during setup of a file transfer) the line typed may be edited with the standard erase and kill characters. A null line in response to a prompt, or an interrupt, will abort the dialogue and return you to the remote machine.

Tip guards against multiple users connecting to a remote system by opening modems and terminal lines with exclusive access, and by honoring the locking protocol used by uucp(ln).

During file transfers tip provides a running count of the number of lines transferred. When using the -) and - ( commands, the eofread and eofwrite variables are used to recognize end-of-file when reading, and specify end-of-file when writing (see below). File transfers normally depend on tandem mode for flow control. If the remote system does not support tandem mode, echocheck may be set to indicate tip should synchronize with the remote system on the echo of each transmitted character.

When tip must dial a phone number to connect to a system, it will print various messages indicating its actions. Tip supports the Racal-Vadic 831 auto-call-units; the Ventel 212 +, Racal-Vadic 3451, and Bizcomp 1031 and 1032 integral call unit/modems.

INSTALLATION

Files needed are:

Name Permissions Owner /bin/tip

/etc/remote /usr/spool/uucp Optional files are:

REV SEP 1985

/etc/phones -/.tiprc -/.tipphones -/.tipremote

-rw-rw-r-- sys

3

136

-rwsr-xr-x uucp -rw-rw-r-- sys drwxr-xr-x uucp

CU(1 N) COMMAND REFERENCE

FOR DIRECT RS-232-C CONNECTION You need the following equipment:

CU(1N)

An RS-232-C line to a target system. (Make sure you are able to login to the target system.)

A modem adapter cable (Tek part# 012-1120-00). It has two male ends that you plug into the female connectors on the target system and the workstation. It also switches the control lines so that two DCE ports can communicate as if they were a DCE/DTE pair.

Things to do:

1. Disable logins on the port you are going to use on your workstation by changing the entry in the letc!ttys(5) file. Then restart the init process by rebooting or sending it a hangup signal. For example make the following changes in the !etc/ttys file on your workstation:

change: 1 ytty1 to Oytty1

2. Type: kill -1 1. This sends the init process the hangup signal. Init(8) rereads the !etc/ttys file and turns off the login on port tty1. This prevents a login process from interfering with the port you are about to use for tip.

3. Use chown to give the tty port you are going to use for the tip connection to uucp. For example:

/etc/chown uucp /dev/tty1

4. Put an entry in the !etc/remote file that describes the port you are going to use. For example:

direct:direct 9600 baud line:\

:dv=(dev/ttyl:br#9600:ta:ie=-A\

:oe= A

5. Using the modem adapter cable, connect the login line from the target machine to the port you have chosen on your workstation.

6. Type tip direct, and tip will open a 9600 baud connection to the target host if you use the above examples.

REV SEP 1985 4

137

CU(1N)

COMMAND REFERENCE

CU (1 N)

FOR MODEM CONNECTION:

You need the following equipment:

A modem adapter cable as above.

A modem that is supported by the uucp Automatic Calling Unit library.

Modems currently supported include: BIZCOMP, VENTEL 212+, VADIC 831 RS-232-C adaptor, VADIC 3451, HAYES smart modem. Other modems will work if they have an emulation mode for one of the above modems.

To make the connection perform the following steps:

1. Disable logins on the port you are going to use on your workstation by changing the entry in the !etc/ttys file. Then restart the init process by rebooting or sending it a hangup signal. For example make the following changes in the !etc/ttys file on your workstation. This example is for tty1:

change 1 ytty1 to Oytty1

2. Use chown to give the tty port you are going to use for the tip connection to uucp. For example:

/etc/chown uucp /dev/tty1

3. Put an entry in the letclremote(5n) file that describes the port and modem you are going to use. For example:

dia11200l1200 Baud Hayes :\

:dv=/dev/ttyl:br#1200:du:at=hayes:

4. Connect your modem to your workstation using the modem adapter cable.

5. Invoke tip. For example:

tip dial1200 5551212

Sometimes you need to type a carriage return after the 11connected11 message to get a prompt.

REV SEP 1985 5

138

CU(1N)

COMMAND REFERENCE

CU(1 N)

Global phone number database.

Private system descriptions.

Private phone numbers.

- l.tiprc Initialization file.

lusrlspoolluucp!LCK ..

*

Lock file to avoid conflicts with uucp. the /usrlspool/uucp directory for the port tip is trying to use. This means that some other user is using this port anything of interest). Variables may be displayed and set through the s escape. The syntax for variables is patterned after vi(J) and mail(lmh).

Supplying all as an argument to the set command displays all variables readable by the user. Alternatively, the user may request display of a particular variable by attaching a? to the end. For example, escape?

displays the current escape character.

Variables are numeric, string, character, or Boolean values. Boolean variables are set merely by specifying their name; they may be reset by prepending a ! to the name. Other variable types are set by

concatenating an equal sign(=) and the value. The entire assignment must not have any blanks in it. A single set command may be used to interrogate as well as set a number of variables. Variables may be initialized at run-time by placing set commands (without the -s prefix in a file .tiprc in your home directory). The -v option causes tip to display the sets as they are made. Certain common variables have

REV SEP 1985 6

139

CU(1 N)

COMMAND REFERENCE

CU(1N)

abbreviations. The following is a list of common variables, their abbreviations, and their default values:

beautify

(Bool) Discard unprintable characters when a session is being scripted; abbreviated be. waiting for the echo of the last character transmitted; default is off.

(str) The set of characters which signify and end-of-transmission during a -

<

file transfer command; abbreviated eofr.

(str) The string sent to indicate end-of-transmission during a

->

file transfer command; abbreviated eofw.

(str) The set of characters which indicate an end-of-line. Tip will recognize escape characters only after an end-of-line.

(char) The command prefix (escape) character; abbreviated es;

default value is a tilde

n.

exceptions

force

(str) The set of characters which should not be discarded due to the beautification switch; abbreviated ex; default value is

\t\nV\b.

(char) The character used to force literal data transmission;

abbreviated fo; default value is (CTRL-P).

framesize

host

REV SEP 1985

(num) The amount of data (in bytes) to buffer between file system writes when receiving files; abbreviated fr.

(str) The name of the host to which you are connected;

abbreviated ho.

7

140

CU(1 N)

prompt

raise

COMMAND REFERENCE CU(1N)

(char) The character which indicates an end-of-line on the remote host; abbreviated pr; default value is \n. This value is used to synchronize during data transfers. The count of lines transferred during a file transfer command is based on receipt of this character.

(Boal) Uppercase mapping mode; abbreviated ra; default value is off. When this mode is enabled, all lowercase letters will be mapped to uppercase by tip for transmission to the remote machine.

raisechar

record

script

(char) The input character used to toggle uppercase mapping mode; abbreviated re; default value is <CTRL-A).

(str) The name of the file in which a session script is recorded;

abbreviated rec; default value is tip.record.

(Boal) Session scripting mode; abbreviated sc; default is off.

When script is true, tip will record everything transmitted by the remote machine in the script record file specified in record. If the beautify switch is on, only printable ASCII characters will be included in the script file (those characters between 040 and

(Boal) Expand tabs to spaces during file transfers; abbreviated tab; default value is false. Each tab is expanded to eight spaces.

(Boal) Verbose mode; abbreviated verb; default is true. When verbose mode is enabled, tip prints messages while dialing, shows the current number of lines transferred during a file transfer operations, and more.

(str) The name of the shell to use for the -! command; default

CU(1 N)

COMMAND REFERENCE

EXAMPLES

This is how variables are set up in the letdremote file:

direct:direct 9600 baud line:\

:dv=/dev/tty1:br#9600:ta:ie=-A\

:oe=AA

CU(1N)

The ie and oe strings refer to the eofread and eofwrite strings described above. See the remote(5n) man page for more details.

This is how variables are set up using a tilde s escape. When tip answers "W- [set]" it is printed over your -s. The escape character must be the first character typed on a line.

You type:

tip types:

You type:

RETURN VALUE [O]

- [set]

eofr=end_of _file_read_string

No errors.

[nonzero] Errors occurred.

CAVEATS

The full set of variables is undocumented and should probably be pared down.

SEE ALSO

remote(5n), phones(5n).

REV SEP 1985 9

140B

CUSUM(1G)

COMMAND REFERENCE

CUSUM(1G)

NAME

cusum - cumulative sum SYNOPSIS

cusum [ -en ] [ vector . . . ] DESCRIPTION

Output is a vector with the ith element being the sum of the first i elements from the input vector. If more than one vector is given, cusum gives the sum of each vector in turn (not the sum of all vectors). If no vector is given, the standard input is assumed.

OPTIONS -en

n is the number of output elements per line.

EXAMPLES

The following example outputs the cumulative sum of the elements of A, three per line.

cusum -cJ A

The following example outputs the cumulative sum of the elements of A followed by the cumulative sum of the elements of B.

cusum A B SEE ALSO

abs(lg), af(lg), bar(lg), bel(lg), bucket(lg), ceil(lg), cor(lg), cvrtopt(lg), dtoc(lg), erase(lg), exp(lg), floor(lg), gamma(lg), gas(lg), gd(lg), ged(lg), graphics(lg), gtop(lg), hardcopy(lg), hilo(lg), hist(lg), hpd(lg), intro(lg), label(lg), list(lg), log(lg), lreg(lg), mean(lg), mod(lg), pair(lg), pd(lg), pie(lg), p/ot(lg), point(lg), power(lg), prime(lg), prod(lg), ptog(lg), qsort(lg), quit(lg), rand(lg), rank(lg), remcom(lg), root(lg), round(lg), siline(lg), sin(lg), subset(lg), td(lg), tekset(lg), title(lg), total(lg), ttoc(lg),

var(lg), vtoc(lg), whatis(lg), yoo(lg), and gps(5g).

141

CUT(1) COMMAND REFERENCE CUT(1) (1) to put files together column-wise (for example, horizontally). To reorder columns in a table, use cut and paste .

The list following -c (no space) specifies character positions (for example, -c1-72 would pass the first 72 characters of each line).

-dchar

The character following -d is the field delimiter (-f option only).

Default is tab. Space or other characters with special meaning to the shell must be quoted.

-flist

The list following - f is a list of fields assumed to be separated in the file by a delimiter character (see -d). For example, -f1, 7 copies the first and seventh field only. Lines with no field delimiters will be passed through intact (useful for table subheadings), unless -s is specified.

-s Suppresses lines with no delimiter characters in case of - f option.

Unless specified, lines with no delimiters will be passed through untouched.

CUT(1)

COMMAND REFERENCE

CUT(1)

This next example maps user IDs to names to set name to current loginname:

name=who am i cut -fl -d" "

RETURN VALUE

CAVEATS

[NO_ERRS] Command completed without error.

[USAGE] Incorrect command line syntax. Execution terminated.

[NP _ERR] An error occurred that was not a system error. Execution terminated.

[P _ERR] A system error occurred. Execution terminated. See intro(2) tor more information on system errors.

Line length is limited to 1023 characters. An error will be produced if a line of greater length is encountered.

SEE ALSO

awk(l), comm(J), egrep(l), fgrep(l), grep(l), join(l), look(l), paste(l), sort(l), uniq(l).

REV SEP 1985 2

143

CVRTOPT(1G)

COMMAND REFERENCE

CVRTOPT(1G)

NAME

cvrtopt - options converter SYNOPSIS

cvrtopt [ -fstring ] [ -istring ] [ -sstring ] [ -tstring ] [ arg . . . ]

DESCRIPTION

Cvrtopt reformats args (usually the command line arguments of a calling shell procedure) to facilitate processing by shell procedures. An arg is

Cvrtopt reformats args (usually the command line arguments of a calling shell procedure) to facilitate processing by shell procedures. An arg is

Im Dokument COMMAND REFERENCE (Seite 136-173)