05-02-2005
740,
3
Join Date: Jul 2002
Last Activity: 17 June 2009, 5:17 PM EDT
Location: Atlanta
Posts: 740
Thanks Given: 0
Thanked 3 Times in 2 Posts
$ - has a few meanings depending upon what it is you are looking at (shell program, awk program, sed, perl, etc).
In a shell program, $ is used to access the value of a variable. For example: Given the assignment, FOO=BAR. In a shell program, to access the value of FOO, you would type $FOO. If you were to type on the command line FOO=BAR and then, after hitting enter, type echo $FOO you would see the result, BAR.
In awk and sed (regular expressions in general), the $ symbol is used to denote the end of a line.
However, in Perl, the $ symbol is used to denote a variable (sort of the reverse of a shell program).
The >& business is a redirection method used when dealing with file descriptors. Standard File descriptors are 0 (STDIN), 1 (STDOUT), and 2 (STDERR). You can create your own file descriptors if you so choose. The >& is the syntax for redirecting the file descriptor stream