Re: Infinite loop in globbing

2011-03-14 Thread Chet Ramey
On 3/14/11 5:00 AM, Roman Rakus wrote: > $ locale > LANG=en_US.UTF-8 > LC_CTYPE="en_US.UTF-8" > LC_NUMERIC="en_US.UTF-8" > LC_TIME="en_US.UTF-8" > LC_COLLATE="en_US.UTF-8" > LC_MONETARY="en_US.UTF-8" > LC_MESSAGES="en_US.UTF-8" > LC_PAPER="en_US.UTF-8" > LC_NAME="en_US.UTF-8" > LC_ADDRESS="en_US.UT

Re: vzctl enter hangs

2011-03-14 Thread Chet Ramey
On 3/14/11 5:15 AM, Henk van de Kamer wrote: >> I'd be interested in seeing what interrupted the select/read/write/ >> sigprocmask system calls in both processes. > > What exactly do you want. A full strace report? > > I'm trying to find the difference between 4.1.9 and 4.2.0 which causes > this

Re: set -x and parameter expansion

2011-03-14 Thread Chet Ramey
On 3/14/11 2:38 AM, Peggy Russell wrote: > This helps clarify the "set -x" difference below which show $r going through > parameter expansion done by the shell before the command [[ sees the > expression. > Okay... > > command [[ that > contains expr set -x > --

Re: ReadLines and Substraction

2011-03-14 Thread Andres Perera
benign dead code: >>> >>> If you can help me with this, will be very happy for that. Thanks in >>> advance. > > #!/usr/bin/env bash > > set -e > > if [[ $(type -t 'mapfile') != 'builtin' ]]; then > function mapfile > { > while getopts C:c: f > do >

Re: Infinite loop in globbing

2011-03-14 Thread Micah Cowan
On 03/14/2011 10:06 AM, Chet Ramey wrote: >> On 03/14/2011 07:55 AM, Chet Ramey wrote: >>> The question is how to best handle it: punt immediately, or just treat it >>> as a single-byte character and move on. >> >> I vote single-byte character; after all, it's possible for a filename to >> contain

Re: Infinite loop in globbing

2011-03-14 Thread Chet Ramey
> On 03/14/2011 07:55 AM, Chet Ramey wrote: > > The question is how to best handle it: punt immediately, or just treat it > > as a single-byte character and move on. > > I vote single-byte character; after all, it's possible for a filename to > contain that character, regardless of what your local

Re: ReadLines and Substraction

2011-03-14 Thread Andres Perera
On Mon, Mar 14, 2011 at 6:38 AM, pk wrote: > yetcom wrote: > >> Hello Everyone, >> >> I have an issue regarding the bash. I have 2 different files and each >> of them involves some float point numbers for each lines. I want to >> subtract each line then put all the results into a file. The first >

Re: Infinite loop in globbing

2011-03-14 Thread Micah Cowan
On 03/14/2011 07:55 AM, Chet Ramey wrote: > The question is how to best handle it: punt immediately, or just treat it > as a single-byte character and move on. I vote single-byte character; after all, it's possible for a filename to contain that character, regardless of what your locale may be. -

Re: Infinite loop in globbing

2011-03-14 Thread Chet Ramey
> >> $ [$'\xFD'$'\xBA'] > >> ^C > >> > >> The bash 4.2 is in infinite loop. The bash 4.1 work well. > > Can you give more details about the setup here? Does the glob match > > any files or not? > Just need to set some utf8 locales (I guess, tried and using > en_US.UTF-8). It doesn't matter if the

Re: Infinite loop in globbing

2011-03-14 Thread Andreas Schwab
Greg Wooledge writes: > In a NON-utf8 locale Try using a utf8 locale. The problem is that xdupmbstowcs2 fails to handle partial multibyte sequences, where mbsnrtowcs may return zero. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 2

Re: Infinite loop in globbing

2011-03-14 Thread Roman Rakus
On 03/14/2011 02:59 PM, Greg Wooledge wrote: On Mon, Mar 14, 2011 at 10:00:14AM +0100, Roman Rakus wrote: $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.U

Re: Infinite loop in globbing

2011-03-14 Thread Greg Wooledge
On Mon, Mar 14, 2011 at 10:00:14AM +0100, Roman Rakus wrote: > $ locale > LANG=en_US.UTF-8 > LC_CTYPE="en_US.UTF-8" > LC_NUMERIC="en_US.UTF-8" > LC_TIME="en_US.UTF-8" > LC_COLLATE="en_US.UTF-8" > LC_MONETARY="en_US.UTF-8" > LC_MESSAGES="en_US.UTF-8" > LC_PAPER="en_US.UTF-8" > LC_NAME="en_US.UTF-8"

Re: ReadLines and Substraction

2011-03-14 Thread pk
yetcom wrote: > Hello Everyone, > > I have an issue regarding the bash. I have 2 different files and each > of them involves some float point numbers for each lines. I want to > subtract each line then put all the results into a file. The first > line float number will be subtract with the first

Infinite loop in globbing

2011-03-14 Thread Roman Rakus
$ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8"