How to use for loops in command prompt in csh shell — looking for decent one liners
问题 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 回答1: Wow, I haven't written a csh script in years. But Bill Joy did write it himself, I suppose it's worth some nostalgia effort... set t=(*) foreach i ($t) echo $i >> /tmp/z end 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