coming from bash shell, I missed on an easy rolling of loops (for i in (…); do … done;)
Would you post typical one-liners of loops in cshell?
ONE LINERS PLEASE, and not multiple-lines
thx
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Wow, I haven’t written a
cshscript in years. But Bill Joy did write it himself, I suppose it’s worth some nostalgia effort…or just
foreach i (*)This loop structure works well with a built-in concept that csh has of a word list. This is sort-of present in bash but not in vanilla posix shells.
The
foreachloop neatly iterates through this data structure.