• Keine Ergebnisse gefunden

DESCRIPTION OF THE "SCRIPT" COMMAND

If the "script" command is execu.ted withou.t any options or

arguments, the oPerating system simply spawns another shell for you.. This script program fu.nctions as a normal shell, bu.t

because it is the child of the shell or script program from which the command was executed, it does not know what you.r home

directory is. The "log" command terminates the child shell and returns control to the parent script.

The "script" command can also be executed with options only.

This form of the command also spawns a script program that interacts with YOll. If used in the password file, the

command should be executed with the '1' option (see Options Avai lable) .

@ 4404 Reference Manual

Finally, the "script" command can be executed with argu.ments or with both options and argu.ments. This form may be used, for example, to execute a "script" script for which you do not have execute permissions. Either of the following commands executes the file "scriptfile":

script scriptfile script <scriptfile

"script" first checks to see that the file specified as an

arg~ent is actually a file that contains commands. If it is not, "script" executes it only if you specify the 'c' option (see Options Available).

Arguments

<argument_list>

Options Available

A list of arguments to pass to the script command. Each element in the argu.ment list consists of a command name followed by the appropriate argu.ments and options. The elements in the list must be se~arated by a valid command

separator \";", "&", "&&", or ":

I").

If any separator characters are used, the entire argu.ment list must be enclosed in s or double qQotation marks.

Options specified to the script program mu.st appear immediately after the name "script" on the command line, so that they are not

conf~sed with options that pertain to the argu.ments passed to the script.

a Start execution with the "sabort" attribute off.

b Ignore control-C and control-\.

c Process the .argu.ment list as a command.

I Run as a login shell. A login shell tries to find the name of the user's home directory by looking in the file" .home?". It also automatically executes the file

".startup" in the working directory.

v Start execution with the verbose attribute on.

x On the next command, do not fork unless necessary.

This option is Qsed only when calling a script program from another program.

NOTE

It is impossible to specify a n~ll string as an argu.ment to a command beca~se the script program removes null strings from the command line.

4404 Reference Manual @ 2-125

ERROR MESSAGES

Built-in commands may not use pipes.

Input to or Olltp~t from the script bllil t-in commands ("chd,"

"dperm," "jobs," "log," "login," and "wait") may not be routed through a pipe.

Cannot execllte "<cmd name>".

The operating system was llnable to execute the specified command.

Either the command does not exist or you do not have execute permission.

Cannot initialize tables.

This error, which should not OCCllr, is usually indicative of a hardware failure. If it does occur, contact your Tektronix field office.

Cannot open I/O redirection file.

The operating system returned an error when the script program tried to open the file specified for I/O redirection. Most probably, the path specified cannot be followed (one of the directories does not exist) or YOll do not have the permissions necessary for opening the file. This message is preceded by an interpretation of the error produced by the operating system.

Cannot open pipe.

The operating system returned an error when the script program tried to open the specified pipe. This message is preceded by an interpretation of the error produced by the operating system.

Error opening a file.

The operating system returned an error when the script program tried to open the specified file. This message is preceded by an interpretation of the error produced by the operating system.

Error reading a file.

The operating system returned an error when the script program tried to read the specified file. This message is preceded by an interpretation of the error prodllced by the operating system.

Error writing a file.

2-126 @ 4404 Reference Manual

The operating system retQrned an error when the script program tried to write to the specified file. This message is preceded by an interpretation of the error produced by the operating system.

I/O redirection conflict.

You tried to redirect standard input, standard output, or standard error to more than one place.

I/O redirection error.

The operating system returned an error when the script program tried to perform the specified I/O redirection. This message is preceded by an interpretation of the error produced by the

operating system.

Memory overflow.

There is not enough memory available to perform the specified command. Most probably, the expansion of the matching characters used on the command line, for which many matches were possible, caused the error.

Missing

"J"

or invalid character range.

Either the right square bracket is missing from the specification of a range of matching characters, or the range specified is

invalid.

No matching file names found.

Matching characters appear on the command line, but no file names match the specified pattern.

Parenthesis usage error.

The parentheses used on the command line are unbalanced.

Too many tasks.

The script program tried to fork, but too many tasks were running at the time. The limit to the number of tasks allowed either to the individual user or to the operating system as a whole was reached.

4404 Reference Manual @ 2-127

Unknown error.

This error should not occur. If it does, contact your Tektronix field office.

Unrecognized argument to built-in command.

The argument specified is not a valid argument to the built-in command in question.

Unterminated string.

The quotation marks used on the command line are unbalanced.

SEE ALSO

2-128 chd dperm jobs log login time wait

@ 4404 Reference Manual

shell

"SHELL" EDITING KEYS AND FUNCTIONS : Key

I

ESC-F

I

word right