The TC Shell uses many of the same control structures as the Bourne Again Shell. In each case the syntax is different, but the effects are the same. This section summarizes the differences between the control structures in the two shells. For more information, refer to “Control Structures” on page 626.
The syntax of the if control structure is
if (expression) simple-command
The if control structure works only with simple commands, not with pipes or lists of commands. You can use the if…then control structure (page 718) to execute more complex commands, such as the following:
tcsh $ cat if_1 #!/bin/tcsh # Routine to show ...