foreach
Assign variable ExamplesRename all files that begin with a capital letter:
% Check whether each command-line argument is an option or not:
foreach arg ($argv) # does it begin with - ? if ("$arg" =~ -*) then echo "Argument is an option" else echo "Argument is a filename" endif end |
|