I want my code to run many processes at the same time.The following example for a code and the source is StackExchange (Unix&Linux ) web site.> #!/bin/bash> for i in $(cat lis.txt); do>      echo $i>      wait>      mkdir $i>  doneThis simple code is designed to create a list of directories from a list of names included in text file. When we run the code, it is creating the folders one by one. How can I modify this code to create all the folders at the same time i.e to do all the job at the same time?
How can a script run many processes at the same time?
scripting
If you have GNU Parallel you can do any of these:parallel mkdir :::: list.txtparallel -a list.txt mkdircat list.txt | parallel mkdir All new computers have multiple cores, but most programs are serial in nature and will therefore not use the multiple cores. However, many tasks are extremely parallelizeable:Run the same program on many filesRun the same program for every line in a fileRun the same program for every block in a fileGNU Parallel is a general parallelizer and makes is easy to run jobs in parallel on the same machine or on multiple machines you have ssh access to.If you have 32 different jobs you want to run on 4 CPUs, a straight forward way to parallelize is to run 8 jobs on each CPU:GNU Parallel instead spawns a new process when one finishes - keeping the CPUs active and thus saving time:InstallationIf GNU Parallel is not packaged for your distribution, you can do a personal installation, which does not require root access. It can be done in 10 seconds by doing this:(wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bashFor other installation options see http://git.savannah.gnu.org/cgit/parallel.git/tree/READMELearn moreSee more examples: http://www.gnu.org/software/parallel/man.htmlWatch the intro videos: https://www.youtube.com/playlist?list=PL284C9FF2488BC6D1Walk through the tutorial: http://www.gnu.org/software/parallel/parallel_tutorial.htmlSign up for the email list to get support: https://lists.gnu.org/mailman/listinfo/parallel