C Shell Scripting/syntax

From Wikibooks, open books for an open world
< C Shell Scripting
Jump to: navigation, search

[edit] Comparison with Bourne shell

[edit] Features

  • List Variables
C Shell has it Bourne doesn't.
  • Shell Functions
Bourne has it C Shell doesn't


[edit] Syntax differences

  • comments
# csh 
: sh
  • assigning variables
set a = b
a = b
  • expressions
if ( a < b ) then
if [ a -lt b ]


Bourne has more advanced command substitution syntax for embedding. (Bourne Shell Scripting/Substitution)

 $( date )

vs

`date`
Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export