I'm a bit rusty on csh, since I never use it but if I remember correctly from when we had a bunch of users to support who did use it, the syntax would be something like:
Code:
foreach file ( *_myfile )
echo $file
end
or if you want the action a or action b
Code:
ls *_myfile >& /dev/null
if ( $status == 0 ) then
foreach file ( *_myfile )
echo $file
end
else
echo "no files"
endif