Re: [PATCH] core-count: A new program to count the number of cpucores

2009-10-27 Thread Pádraig Brady
Bruno Haible wrote: > Pádraig Brady wrote: > >> Hmm it's a bit surprising that min()/max() are not available >> as $((shell arithmetic)) or in `expr`. Consequently I agree that >> adding the option you suggest is useful. > > But min() and max() are available through the 'test' > program or shell

Re: [PATCH] core-count: A new program to count the number of cpucores

2009-10-26 Thread Bruno Haible
Pádraig Brady wrote: > Hmm it's a bit surprising that min()/max() are not available > as $((shell arithmetic)) or in `expr`. Consequently I agree that > adding the option you suggest is useful. But min() and max() are available through the 'test' program or shell built-in command. If the user ca

Re: [PATCH] core-count: A new program to count the number of cpucores

2009-10-26 Thread Giuseppe Scrivano
Pádraig Brady writes: > Hmm it's a bit surprising that min()/max() are not available > as $((shell arithmetic)) or in `expr`. Consequently I agree that > adding the option you suggest is useful. What will we call it though? I remember a recent discussion about adding min/max to sort. Is still

Re: [PATCH] core-count: A new program to count the number of cpucores

2009-10-26 Thread Paolo Bonzini
On 10/26/2009 11:33 AM, Pádraig Brady wrote: So how about sort -j,--jobs to match `make`? Agreed. However, I think that for coreutils programs it should be the default to use threads whenever possible. Paolo

Re: [PATCH] core-count: A new program to count the number of cpucores

2009-10-26 Thread Pádraig Brady
Gilles Espinasse wrote: > - Original Message - > From: "Giuseppe Scrivano" >> >> For example, assuming that `sort' will soon get the --threads option and >> an user decides to use all cores except one to sort a file, then it can >> be done as: >> >> sort --threads="$(($(core-count) - 1))"

Re: [PATCH] core-count: A new program to count the number of cpucores

2009-10-26 Thread Gilles Espinasse
- Original Message - From: "Giuseppe Scrivano" To: "Bruno Haible" Cc: ; ; "Jim Meyering" Sent: Monday, October 26, 2009 12:45 AM Subject: Re: [PATCH] core-count: A new program to count the number of cpucores ... > > If it is meant as a tool for