c

csh(1)

csh(1)

the top. A synonym for popd, called rd, is provided for historical reasons. Its use is not recommended because it is not part of the standard BSD csh and may not be supported in future releases.

pushd [ name ] [ +n ]

With no arguments, pushd exchanges the top two elements of the directory stack. Given a name argument, pushd changes to the new directory (using cd) and pushes the old current working directory (as in csw) onto the directory stack. With a numeric argument, pushd rotates the n th argument of the directory stack around to be the top element and changes to that directory. The members of the directory stack are numbered from the top starting at 0. A synonym for pushd, called gd, is provided for historical reasons. Its use is not recommended since it is not part of the standard BSD csh and may not be supported in future releases.

rehash

Causes the internal hash table of the contents of the directories in the path variable to be recomputed. This is needed if new commands are added to directories in the path while you are logged in. This should only be necessary if you add commands to one of your own directories or if a systems programmer changes the contents of one of the system directories.

repeat count command

The speci®ed command (which is subject to the same restrictions as the command in the one- line if statement above) is executed count times. I/O redirections occur exactly once, even if count is 0.

set

set name

set name=word

set name[ index ]=word set name=( wordlist )

The ®rst form of set shows the value of all shell variables. Variables whose value is other than a single word print as a parenthesized word list. The second form sets name to the null string. The third form sets name to the single word. The fourth form sets the indexth component of name to word; this component must already exist. The ®nal form sets name to the list of words in wordlist. In all cases the value is command and ®le-name expanded.

These arguments can be repeated to set multiple values in a single set command. Note, how- ever, that variable expansion happens for all arguments before any setting occurs.

setenv name value

Sets the value of environment variable name to be value, a single string. The most commonly used environment variables, USER, TERM, and PATH, are automatically imported to and exported from the csh variables user, term, and path; there is no need to use setenv for these.

shift [ variable ]

If no argument is given, the members of argv are shifted to the left, discarding argv[1]. An error occurs if argv is not set or has less than two strings assigned to it. When variable is speci®ed, shift performs the same function on the speci®ed variable.

source [-h]name

csh reads commands from name. source commands can be nested, but if nested too deeply the shell may run out of ®le descriptors. An error in a source at any level terminates all nested source commands. Normally, input during source commands is not placed on the history list. The -hoption can be used to place commands in the history list without being executing them.

stop [ %job ... ]

Stops the current (no argument) or speci®ed jobs executing in the background.

suspend

Causes csh to stop as if it had been sent a suspend signal. Since csh normally ignores suspend signals, this is the only way to suspend the shell. This command gives an error message if attempted from a login shell.

switch (string) case str1:

Section 1134

− 6 −

HP-UX Release 11i: December 2000