On Mon, Jan 30, 2012 at 10:11 PM, Darac Marjal <mailingl...@darac.org.uk> wrote: > On Mon, Jan 30, 2012 at 06:06:06PM +0800, lina wrote: >> Hi, >> >> ( sorry if it a bit off-topic) >> >> I have a script like >> >> #!/bin/bash >> >> for i in {0..108} >> do >> >> some job will run for mins & >> >> done >> >> Here I used & for some kinda of parallel. >> but there is a problem, >> >> I wished at most it only run 8 jobs simultantly, no more than 8, once >> finished, a new job can continue, >> >> Some suggestions? > > No doubt someone will be able to critique my makefile (I just cobbled it > together from a few minutes reading). > > cat <<EOF >Makefile > all: part1 part2 part3 part4 .... part108 > > part1: DoSomething.sh
a quick Q, how can I use 1 of part1 inside the Dosomething, $a=$1 (?) cat_g_f -f m001\_$a\_sot.xtc m002\_$a\_sot.xtc m003\_$a\_sot.xtc m004\_$a\_sot.xtc -cat -o m\_$a.xtc -nice 0 > > part2: DoSomethingElse.sh > > part3 part4 part5: echo "This is part $@" > > EOF > > make -j8 all > Thanks all > > -- > Darac Marjal > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > Archive: http://lists.debian.org/20120130141144.ga27...@darac.org.uk > -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAG9cJm=kZLAsjqZSoipk3TKifXsMZ0Au-RYLCLJfm=lauz9...@mail.gmail.com