c
csh(1) | csh(1) |
ls
one could execute !{l}a to do
ls
while !la would look for a command starting with la.
Quoting with Single and Double Quotes
The quotation of strings by single quotes (') and double quotes ( " ) can be used to prevent all or some of the remaining substitutions. Strings enclosed in single quotes are protected from any further interpretation. Strings enclosed in double quotes are still variable- and
In both cases the resulting text becomes (all or part of) a single word. Only in one special case (see Command Substitution below) does a
Alias Substitution
csh maintains a list of aliases that can be established, displayed, and modi®ed by the alias and unalias commands. After a command line is scanned, it is parsed into distinct commands and the ®rst word of each command,
Thus, if the alias for ls is ls
If an alias is found, the word transformation of the input text is performed and the aliasing process begins again on the
Note that the mechanism allows aliases to introduce parser metasyntax. Thus:
alias print 'pr \!* lp'
makes a command that uses pr(1) to print its arguments on the line printer.
Expressions
Some of the
&& Ã & == != =Ä !Ä <= >= < > << >> + - * / % ! Ä ( )
The following list shows the grouping of these operators. The precedence decreases from top to bottom in the list:
*/ % + - << >>
<= >= < > == != =Ä !Ä
The operators ==, !=, =Ä, and !Ä compare their arguments as strings; all others operate on numbers. The operators =Ä and !Ä are similar to != and ==, except that the
Strings beginning with 0 are considered octal numbers. Null or missing arguments are considered 0. The result of all expressions are strings that represent decimal numbers. It is important to note that no two components of an expression can appear in the same word. These components should be surrounded by spaces except when adjacent to components of expressions that are syntactically signi®cant to the parser:
Also available in expressions as primitive operands are command executions enclosed in curly braces ( { } ) and ®le enquiries of the form
Section 1−138 | − 10 − |