foreach syntax in csh
10,430
There should be no in
:
foreach file ( . )
Be sure to read Stop Using (and Teaching) C-Shell.
Author by
mahmood
Updated on June 13, 2022Comments
-
mahmood almost 2 years
For this
csh
script#!/bin/csh foreach file in (.) echo "$file" end
I get this error
foreach: Words not parenthesized.
How can I fix that?
-
Demis almost 2 yearsFYI, some people may be forced to use CSH due to vendor hardware - as in the case of ASML equipment, for example. ( wiki.nanotech.ucsb.edu/wiki/Stepper_3_(ASML_DUV) ) Installing new shells (or installing anything in general) is not recommended on such equipment to ensure functionality is not compromised. I do entirely agree though - I wish I could use something other than CSH!