Metacharacters, Shell metacharacters – HP NonStop G-Series User Manual

Page 32

Advertising
background image

Table 1 Selected OSS Shell Features (continued)

Description

Feature

A feature that allows user-assigned values to be passed to the shell and to variables
in the command line.

Parameter substitution

A feature that allows you to use a command’s output as if it was the value of a
variable.

Command substitution

Mechanisms for trapping interruptions and other OSS signals.

Signal trapping

A feature that allows values, attributes, and comparisons to be tested.

Conditional expressions

A feature that allows you to run, monitor, and manage foreground and background
processes.

Job control

The ability to group data and call it by a name.

Arrays

Metacharacters

Table 2

lists shell metacharacters (characters that have special meaning to the shell).

Table 2 Shell Metacharacters

Description

Metacharacter

Syntactic

Separates commands that are part of a pipeline.

|

Runs the next command if the current command succeeds.

&&

Runs the next command if the current command fails.

||

Separates commands that should be executed sequentially.

;

Separates elements of a case construct.

;;

Runs commands in the background.

&

Groups commands to run as a separate process in a subshell.

( )

Groups commands without creating a subshell.

{ }

Filename

Separates the parts of a file’s pathname.

/

Matches any single character except a leading dot.

?

Matches any sequence of characters except a leading dot.

*

Matches any of the enclosed characters.

[ ]

Specifies a home directory when used at the beginning of a filename.

~

Quotation

Specifies that the following character should be interpreted literally; that is, without its
special meaning to the shell.

\

Specifies that any of the enclosed characters (except for the single-quotation-mark
character) should be interpreted literally; that is, without their special meaning to the
shell.

'...'

Specifies that the $ (dollar sign), ` (grave accent), and \ (backslash) characters keep
their special meaning to the shell, while all other enclosed characters should be
interpreted literally to the shell; that is, without their special meaning to the shell.

"..."

Input/Output

Redirects input.

<

32

The OSS Shell

Advertising
This manual is related to the following products: