Sep 9, 2005 #1 T they Junior Member level 2 Joined Sep 14, 2004 Messages 24 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 265 When I write a foreach loop as below: ####################################### #!/bin/tcsh -f foreach file (\ a\ b\ c\ ) commands ....... ...... ...... end exit 0 ################################ The script always executes the first file (a) only, after that it will report a message: "Too many ')' s." and stop the script. May I know that what is the reason of that?
When I write a foreach loop as below: ####################################### #!/bin/tcsh -f foreach file (\ a\ b\ c\ ) commands ....... ...... ...... end exit 0 ################################ The script always executes the first file (a) only, after that it will report a message: "Too many ')' s." and stop the script. May I know that what is the reason of that?
Sep 9, 2005 #2 _TopGun_ Member level 4 Joined Aug 20, 2005 Messages 75 Helped 9 Reputation 18 Reaction score 3 Trophy points 1,288 Location Zelenograd, Russian Federation Activity points 1,696 Try to use {} instead of ()... May be this could help you.
Sep 11, 2005 #3 H Hughes Advanced Member level 3 Joined Jun 10, 2003 Messages 715 Helped 113 Reputation 226 Reaction score 27 Trophy points 1,298 Activity points 5,984 It seems all right. What is the exact code? I have replaced commands with echo $file and tested the code, all worked fine.
It seems all right. What is the exact code? I have replaced commands with echo $file and tested the code, all worked fine.