Kick off multiple instances of script

I had the need to launch about 100 instances of a script all at once to scrape some web data. This was the loop I used:

for f in *.txt; do python $f & done


  • Semicolon launches consecutively, waiting for previous script to finish:
    • for f in *.txt; do $f; done
  • Ampersand launches in the background rather than waiting for the consecutive script before it to finish:
    • for f in *.txt; do $f & done