• Aucun résultat trouvé

USER COMMANDS dump

Dans le document SYSTEM 4400 SERIES (Page 61-69)

FORMAT FOR ARGUMENTS

USER COMMANDS dump

dump

Sends both a hexadecimal and an ASCII listing of a file to standard output.

SYNTAX

dump <file_name> [+i]

dump [<file_name_list>]

DESCRIPTION

The dump command sends a hexadecimal and an ASCII listing of a file to standard output. The two versions of the file appear side by side. A line of output consists of the address in the file at which that line starts, the hexadecimal contents of the byte at that address and of the following fifteen bytes, and the sequence of characters represented by these bytes. A nonprintable character appears as a period, ".", in the ASCII part of the listing.

The user may interrupt the dump command at any time by typing a CTRL-C. Normally, a CTRL-C returns the user to the shell program. However, if the dump command is in interactive mode and is actually displaying information when the user types a CTRL-C, dump stops the output and prompts for another address.

ARGUMENTS

<file name>

<file_name _list>

OPTIONS

The name of the file to dump. The default is standard input.

The name of files to dump. You cannot use this interactively.

Enter interactive mode. The "i" option may be used only if exactly one file name appears on the command line. If the user specifies the "i" option, the dump command prompts for the address at which to begin. The address is relative to the first byte in the ftle, whose address is O. An address preceded by a period is a decimal address; otherwise it is a hexadecimal address. The user may specify a single address, a range of addresses (two addresses separated by a hyphen, or an initial address and an offset (an address followed by either a comma or a space, followed by a number). In the first case, the dump command displays sixteen bytes of information, beginning with the specified address. In the second case, it displays all the bytes from the first to the second address inclusive. In the third case, it begins displaying bytes at the address specified and continues for as many bytes as the following number dictates.

EXAMPLES

dump memo /cynthia/letter

Sends both a hexadecimal and an ASCII listing of the file memo, which is the working directory, and the file letter, which is in the directory Icynthia, to standard output.

dump letter +i

Enters interactive mode and prompts the user for the address at which to begin dumping the file letter.

dump testprog >test.dump

Sends a hexadecimal and ASCII listing of the file testprog via redirected I/O to the file test.dump.

ERROR MESSAGES

Cannot interactively dump multiple files.

The "i" option may not be used if more than one file name appears on the command line.

Cannot interactively dump standard input.

If the user specifies no file name on the command line, the default is standard input. The "i"

option may not be used in such a case.

Error opening <file_name>: <reason>

The operating system returned an error when dump tried to open <file_name>. This message is followed by an interpretation of the error returned by the operating system.

Invalid option <char>: ignored.

The option specified by <char> is not a valid option to the dump command. The command ignores it.

SEE ALSO

compare

echo

Writes the arguments on the command line to standard output.

SYNTAX

echo [<argument_list>] [+1] [+<hex_num>]

DESCRIPTION

The echo command writes the arguments in <argument_list> to standard output. A space character appears after each string argument; no space appears after a hexadecimal argument;

while the last argument is followed by a carriage return. You can use echo to non-destructively show how the shell or script programs evaluate special characters in the <argument_list>.

ARGUMENTS

A list of arguments to write to standard output.

FORMAT FOR ARGUMENTS

Each element in <argument_list> consists either of a string or a hexadecimal number preceded by a plus sign, "+".

OPTIONS

1

<hex num>

Do not write a carriage return after echoing the argument list.

Send the equivalent hex byte to standard output.

EXAMPLES

echo This is a test!

Writes the string This is a test! to standard output, which defaults to the console.

echo This is a test! +7 +1 >/dev/console

Writes the string This is a test!, followed by the bell character (hexadecimal 7), to standard output. Standard output is redirected to /dev/console (the 4400 display). The output is not followed with a carriage return. (The +1 is the option plus el, not the hexadecimal argument plus one.)

USER COMMANDS edit

edit

Invokes the text editor in order to create a new text file or edit an existing one.

SYNTAX

DESCRIPTION

The edit command may be used with zero, one, or two arguments. With one argument, edit opens the specified file for editing, creating it if necessary, and reads as much of the file as possible into the edit buffer. At the end of an editing session of a pre-existing file, the editor renames the original file by appending the letters .bak to its name. If this addition would result in a file name of more than 55 characters (the maximum allowed by the operating system), the editor shortens the original name before adding the suffix. If a backup file already exists, the editor prompts for permission to delete it.

If the user specifies no arguments, the editor prompts for the name of the file at the end of the editing session, before returning control to the operating system. It does not accept the name of an existing file.

If the user specifies two file names, the operating system makes a copy of the first file specified, gives it the name specified by the second argument, and opens it for editing. If a file with that name already exists, the editor prompts for permission to delete it before proceeding. In such a case, the editor creates the new file with the same permissions as the old file.

Files created by the editor have permissions of rw-rw-.

ARGUMENTS

<file name 1

-

- >

<file name 2> -

-The name of the file to open for editing, or, if two file names are specified, the name of the file to copy.

The name to give to the copy of the file specified by <file_name_b. It is this copy that is opened for editing.

OPTIONS

b Do not save the original copy of the file as a backup file at the end of the editing session.

n y

Do not read any text into the edit buffer. This option allows the user to make large insertions at the beginning of a file.

If only one argument appears on the command line, at end of the editing session automatically replace any existing backup file with the original copy of the file being edited. If two arguments appear on the command line and the second file specified already exists, delete that file at the beginning of the editing session.

EXAMPLES

edit test +ny

Opens the file test in the working directory but does not read any of it into the edit buffer. If the file does not exist, the editor creates it. At the end of the session, edit automatically replaces any existing backup file with the original copy of test.

edit test oldtest

Makes a copy of the file test, names it oldtest, and opens it for editing. If a file named oldtest already exists, the editor asks for permission to delete it.

MESSAGES

Delete existing copy of new file?

The file specified by </ile_name_2> already exists. If the user responds with a "y", the editor deletes the existing copy of the file and opens the new file for editing. If the user responds with an "nil, the editor leaves the existing file intact and returns the user to the operating system.

File already exists File name?

The edit command was executed with no arguments on the command line. At the end of the editing session, when the editor prompted for the name of the file, the user specified an existing file. Under these circumstances, the editor does not accept the name of an existing file.

USER COMMANDS edit

ERROR MESSAGES

Cannot create new file

The editor cannot open the file specified by <file_name_2>. Most probably, either the user specified a path name that could not be followed or the user does not have the permissions necessary to open the file.

Cannot open edit file

The editor cannot open the file specified by <file_name_1>. Most probably, either the user specified a path name that could not be followed or the user does not have the permissions necessary to open the file.

Cannot read edit file

The editor encountered an 110 error trying to read the specified file.

Edit file does not exist

The user has specified two file names on the command line, but <file_name _1> does not exist.

New file is the same as the old file

Both <file_name _1> and <file_name _ 2> refer to the same file. (If their names are not the same, they are links to the same file.)

Too many file names specified.

The edit command requires zero, one, or two arguments. This message indicates that the argument count is wrong.

Unknown option specified

An option on the command line is not a valid option to the edit command. The command ignores the option and proceeds.

SEE ALSO

create dperm

Section 4 Text Editor edit

env

Displays, removes, assigns, and changes the environment variables.

SYNTAX

env [<name>] [<name>=] [<name>=<value>]

ARGUMENTS

<name> The name of the environment variable to display.

<name=> The name of the environment variable to remove from the environment list.

<name>=<value> The value to assign to an environment variable.

DESCRIPTION

The env command, which is part of the shell program, displays the current values of the environment variables if no argument is given. If an argument is specified, the env command assigns, changes, or deletes the value of the named argument.

EXAMPLE

env

Displays all environment variables.

env TERM=

Removes the environment variable TERM from the environment variable list.

env TERM=4404

Assigns TERM to the environment variable list with the value "4404".

env TERM=4406

Changes TERM in the environment variable list to the value of" 4406".

SEE ALSO

script

USER COMMANDS

Dans le document SYSTEM 4400 SERIES (Page 61-69)