Coding Knowledge Center
CSH
Conditional (if/else if/endif) |
if () {
} else if () {
} else {
}
endif
Construct for if/else if/else statements.
Do loop |
#!/bin/csh
foreach item(`more items)
echo $item
cd /to/the/path/$item
tar -xzvf $item.tgz
end
This little handy script will take a files list of items and loop through them. Then it will perform some given action on each item.