That depends on what you are iterating for the foreach. In other words, how are you going to name each directory? Is it a file with names listed on a single line, incrementing numbers, or something else?
The basics of a foreach command in csh is as below, stolen from cyberciti.biz ( https://www.cyberciti.biz/faq/csh-shell-scripting-loop-example/): foreach n ( 1 2 3 4 5 ) #command1 #command2 end Where 'n' is your iterator variable, the list or commands to iterate on in the (), and the commands to run on each iteration. You can reference the iteration variable in the commands. In your case, each iteration the value of 'n' would change to the name of the next directory. The command would be similar to: "mkdir $n" Example: foreach n ( 1 2 3 4 5 6 7 8 9 10 ) mkdir directory_$n end This would make the following directories: directory_1 directory_2 directory_3 directory_4 directory_5 directory_6 directory_7 directory_8 directory_9 directory_10 On Tue, Aug 8, 2017 at 9:04 AM Ali Gamal <aligam...@gmail.com> wrote: > Hi, > > how can I create 200 folder using foreach command in csh script > > -- > -- > You received this message because you are subscribed to the Linux Users > Group. > To post a message, send email to linuxusersgroup@googlegroups.com > To unsubscribe, send email to linuxusersgroup+unsubscr...@googlegroups.com > For more options, visit our group at > http://groups.google.com/group/linuxusersgroup > References can be found at: http://goo.gl/anqri > Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules) > --- > You received this message because you are subscribed to the Google Groups > "Linux Users Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to linuxusersgroup+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Jeremiah Bess -- -- You received this message because you are subscribed to the Linux Users Group. To post a message, send email to linuxusersgroup@googlegroups.com To unsubscribe, send email to linuxusersgroup+unsubscr...@googlegroups.com For more options, visit our group at http://groups.google.com/group/linuxusersgroup References can be found at: http://goo.gl/anqri Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules) --- You received this message because you are subscribed to the Google Groups "Linux Users Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to linuxusersgroup+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.