lina writes:
> 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 cont
On 1 Feb, 2012, at 1:19, Nicolas Bercher wrote:
> On 31/01/2012 17:22, lina wrote:
>> I need time to understand the suggestions have been given.
>
> Yes, of course. But this may interest other pepole on the list since your
> topic since to be of great interest for others, including me!
http:/
I need time to understand the suggestions have been given.
A quick thanks.
Best regards,
On Wed, Feb 1, 2012 at 12:10 AM, Nicolas Bercher wrote:
> What about the use of ulimit or any other tool that your sysadmin could
> control?
>
> On the other hand, these solutions seem ok:
>
> http://stack
What about the use of ulimit or any other tool that your sysadmin could control?
On the other hand, these solutions seem ok:
http://stackoverflow.com/questions/1537956/bash-limit-the-number-of-concurrent-jobs
Nicolas
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a
On 31/01/2012 03:19, Cam Hutchison wrote:
seq 0 108 | xargs -I@ -P8 cat A_@.txt B_@.txt C_@.txt -o ABC_@.txt
Of course, this is (since cat -o doesn't exist):
seq 0 108 | xargs -I@ -P8 cat A_@.txt B_@.txt C_@.txt > ABC_@.txt
but "> ABC_@.txt" is out of the scope of xargs.
Nicolas
--
To UN
lina writes:
>Yes. the ultimate goal is:
>for i in {0..108}
>do
>cat A_$i.txt B_$i.txt C_$i.txt -o ABC_$i.txt (output as ABC_$i.txt)
>done
>but here I wish to use only 8 processors at most, total is 16.
>the administrator of the cluster asked me not to use whole, cause
>someone else needs SMP
On 20120130_223623, Jochen Spieker wrote:
> lina:
> >
> > Yes. the ultimate goal is:
> >
> > for i in {0..108}
> > do
> > cat A_$i.txt B_$i.txt C_$i.txt -o ABC_$i.txt (output as ABC_$i.txt)
> > done
>
> Ok, so you don't actually have only A_$i filenames, but B_$i and C_$i as
> well. That alone
lina:
>
> Yes. the ultimate goal is:
>
> for i in {0..108}
> do
> cat A_$i.txt B_$i.txt C_$i.txt -o ABC_$i.txt (output as ABC_$i.txt)
> done
Ok, so you don't actually have only A_$i filenames, but B_$i and C_$i as
well. That alone makes my previous approach useless (as I predicted!).
The other
On Tue, Jan 31, 2012 at 12:05 AM, Jochen Spieker wrote:
> lina:
>>
>> well, a question,
>>
>> $ seq 0 3 | xargs --verbose echo A
>> echo A 0 1 2 3
>> A 0 1 2 3
>>
>> How can I make the output as:
>>
>> A0 A1 A2 A3
>
> Your problem in this case is that xargs adds whitespace before adding
> argument
lina:
>
> well, a question,
>
> $ seq 0 3 | xargs --verbose echo A
> echo A 0 1 2 3
> A 0 1 2 3
>
> How can I make the output as:
>
> A0 A1 A2 A3
Your problem in this case is that xargs adds whitespace before adding
arguments. What you can do is to modify seq's output before xargs sees
it:
$
On Mon, Jan 30, 2012 at 10:29 PM, Jochen Spieker wrote:
> lina:
>> On Mon, Jan 30, 2012 at 6:35 PM, Jochen Spieker
>> wrote:
>>> lina:
I wished at most it only run 8 jobs simultantly, no more than 8, once
finished, a new job can continue,
>>>
>>> Xargs can be used for this. An exm
On Mon, Jan 30, 2012 at 10:11 PM, Darac Marjal 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
On Mon, Jan 30, 2012 at 10:08 PM, Chen Wei wrote:
> On Mon, Jan 30, 2012 at 06:06:06PM +0800, lina wrote:
>> 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
lina:
> On Mon, Jan 30, 2012 at 6:35 PM, Jochen Spieker wrote:
>> lina:
>>>
>>> I wished at most it only run 8 jobs simultantly, no more than 8, once
>>> finished, a new job can continue,
>>
>> Xargs can be used for this. An exmaple:
>>
>> $ seq 1 100 | xargs -n1 -P8 echo
>>
>> Seq prints the
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 a
On Mon, Jan 30, 2012 at 06:06:06PM +0800, lina wrote:
> 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,
On Mon, Jan 30, 2012 at 6:35 PM, Jochen Spieker wrote:
> lina:
>>
>> I wished at most it only run 8 jobs simultantly, no more than 8, once
>> finished, a new job can continue,
>
> Xargs can be used for this. An exmaple:
>
> $ seq 1 100 | xargs -n1 -P8 echo
>
> Seq prints the numbers from 1 to 100
lina:
>
> I wished at most it only run 8 jobs simultantly, no more than 8, once
> finished, a new job can continue,
Xargs can be used for this. An exmaple:
$ seq 1 100 | xargs -n1 -P8 echo
Seq prints the numbers from 1 to 100 (one per line) and xargs starts an
echo for each argument with 8 invo
On Mon, Jan 30, 2012 at 6:06 PM, 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 r
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
20 matches
Mail list logo