Computer Services & Repairs
Chicago and Suburbs
 

Table of Contents


 

6.0 Symbol Commands

Symbol

Description

( )

Group commands. The shell creates a copy of itself, called subshell, for each group.

Example:

[bash]$ (a;b) & c &


$( )

Commands Substitution

(( ))

Arithmetic evaluation: a synonym for let (use when the enclosed value contains an equal sign)

$(( ))

Arithmetic expansion

[ ]

The test command

[[ ]]

Conditional expression; similar to [ ] but adds string comparisons

#

After a pound sigh you can put any comment in script without disturbing

;

Semicolon is a command separator that does not initiate execution of a command and does not change any aspect of the command function

\

Backslash continues a command. When you enter a long command line and the cursor reaches the right side of the screen, you can use backslash (\) character tocontinue the commands on the next line.

~

Symbol, shortcut for a Home Directory. Can be used anywhere.

Example:

[bash]$ ls ~

[bash]$ cd ~


`

Back quote is used by shell to perform command substitution.

Example:

[bash]$ echo “The date is `date`”


{ }

Curly braces are another means of expansion. When used for a list of comma-separated strings, they will match what is within the curly braces.

Example:

[bash]$ ls ~.filename.{txt,doc,exe} # (Preambles)

[bash]$ mkdir {1,2,3} test # (Postable)


 
 
   

Copyright 2006 © Burnnet Computers LLC.