Re: building arrays from non array variables using 'array[${#arr...@]}]='

2010-01-25 Thread Mart Frauenlob
On 24.01.2010 21:19, Chet Ramey wrote: > On 1/24/10 5:13 AM, Mart Frauenlob wrote: >> Hello, >> >> I'd like to ask, if the behavior of indexed array assignment using the >> form: 'array[${#arr...@]}]=' is as expected. > > Thanks for the report. The question is what ${#arr...@]} should return > wh

Argument list too long (how to remove the limit)

2010-01-25 Thread Peng Yu
I got the following message. Is there a way to configure bash such that there is not a limit like this? /bin/bash: Argument list too long

Re: Argument list too long (how to remove the limit)

2010-01-25 Thread Jon Seymour
If you can, it is better to restructure what you want to do by passing the arguments to the target command on stdin, rather than on the command line. I realise that this may not be possible in all cases, but it is generally the preferred approach if you can achieve it. The advantage is that your r

Re: Argument list too long (how to remove the limit)

2010-01-25 Thread Mart Frauenlob
On 26.01.2010 01:03, Peng Yu wrote: > I got the following message. Is there a way to configure bash such > that there is not a limit like this? > > /bin/bash: Argument list too long > > http://www.linuxjournal.com/article/6060 best regards Mart

Re: Argument list too long (how to remove the limit)

2010-01-25 Thread Sven Mascheck
Peng Yu wrote: > Is there a way to configure bash such > that there is not a limit like this? > > /bin/bash: Argument list too long bash is not to blame - it reports an error message from the kernel. You seem to have called bash (or some other command?) with too many arguments, exceeding your ke

Re: Argument list too long (how to remove the limit)

2010-01-25 Thread Bob Proulx
Peng Yu wrote: > I got the following message. Is there a way to configure bash such > that there is not a limit like this? > > /bin/bash: Argument list too long This is a kernel limitation not a bash limitation. Note that POSIX only requires that 4k be available. However some kernels have remov

exec, redirections and variable expansions

2010-01-25 Thread mike bakhterev
From: mike To: bug-bash@gnu.org Subject: [50 character or so descriptive subject here (for reference)] Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux

Selecting out of an array

2010-01-25 Thread Jon_R
Hello List, I am new to shell scripting and programming in general, so please excuse my ignorance. :) I am trying to setup a menu for some videos that I have so that you can select one and it will play it using xine or mplayer. My first attempt was to assign each video a variable name and then I

Re: Selecting out of an array

2010-01-25 Thread DennisW
On Jan 25, 7:28 pm, Jon_R wrote: > Hello List, > > I am new to shell scripting and programming in general, so please excuse my > ignorance. :) > > I am trying to setup a menu for some videos that I have so that you can > select one and it will play it using xine or mplayer. My first attempt was >

Re: Selecting out of an array

2010-01-25 Thread Jan Schampera
Jon_R schrieb: > http://old.nabble.com/file/p27316649/newsh2.sh newsh2.sh You have a misunderstanding about select here, I guess. Select is supposed to display a list of given words and take user input (index to these words). It more or less is the same as a for loop, it just doesn't iterate th