Re: read + ^V

2009-11-11 Thread Chet Ramey
Antonio Macchi wrote: > using ^V to pass an ascii character to read, the behavior is incoherent > beetween simple read, and read -nx When using the -n option, bash puts the terminal into character-at-a-time non-canonical mode, which disables the tty special characters. When using read without tha

Re: 4.0 core dump from printf -v foo %s b

2009-11-11 Thread Chet Ramey
Greg Wooledge wrote: > The other two messages I sent today were just things I encountered while > bringing my bash 4.0 up to the current patch level. This is the real > problem I've been chasing. > > imadev:/var/tmp/bash-4.0$ bash-3.1.17 -c 'printf -v foo %s bar' > imadev:/var/tmp/bash-4.0$ bash-

Re: qwerty

2009-11-11 Thread Chet Ramey
Ken Irving wrote: >> $ printf "%d %s\n" 1 ok - >> 1 ok >> -bash: printf: -: invalid number >> 0 >> >> why getting error here, and not in the previous? >> why "invalid number" ? >> what is that zero? > > Again, you have more arguments than operators, so it makes another pass, > and on the second p

Re: qwerty

2009-11-11 Thread Antonio Macchi
There's nothing to fix. It might help if you provide some markers sorry, and thanks for your patience... in your test patterns so you can see where each argument begins and ends, e.g., $ printf "(%d) {%s}\n" 1 ok - (1) {ok} -bash: printf: -: invalid number (0) {} ... and f

Re: qwerty

2009-11-11 Thread Ken Irving
On Thu, Nov 12, 2009 at 01:47:52AM +0100, Antonio Macchi wrote: > $ printf "%s\n" ok - > ok > - > > why that score in the newline? Your pattern has one format operator, but there are two arguments, so the pattern is applied again. > > > $ printf "%d %s\n" 1 ok - > 1 ok > -bash: printf: -

qwerty

2009-11-11 Thread Antonio Macchi
$ printf "%s\n" ok - ok - why that score in the newline? $ printf "%d %s\n" 1 ok - 1 ok -bash: printf: -: invalid number 0 why getting error here, and not in the previous? why "invalid number" ? what is that zero? $ printf "%2s\n" qwerty qwerty strings larger than fixed-wi

read + ^V

2009-11-11 Thread Antonio Macchi
using ^V to pass an ascii character to read, the behavior is incoherent beetween simple read, and read -nx $ read ^V^A $ hd <(echo -n $REPLY) 01|.| 0001 $ read -n1 ^V $ hd <(echo -n $REPLY) 16

4.0 core dump from printf -v foo %s bar

2009-11-11 Thread Greg Wooledge
The other two messages I sent today were just things I encountered while bringing my bash 4.0 up to the current patch level. This is the real problem I've been chasing. imadev:/var/tmp/bash-4.0$ bash-3.1.17 -c 'printf -v foo %s bar' imadev:/var/tmp/bash-4.0$ bash-4.0.10 -c 'printf -v foo bar' ima

siglist.c missing #include "bashintl.h"

2009-11-11 Thread Greg Wooledge
/net/appl/gcc-3.3/bin/gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde -L./lib/malloc -L./lib/sh-g -O2 -o bash shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o flags.o jobs.o subst.o hashcm

4.0 patch 25 breaks older gcc

2009-11-11 Thread Greg Wooledge
make[1]: Entering directory `/var/tmp/bash-4.0/lib/glob' rm -f glob.o /net/appl/gcc-3.3/bin/gcc -c -DHAVE_CONFIG_H -DSHELL -I. -I../.. -I../.. -I../../include -I../../lib -DHPUX -g -O2 glob.c glob.c:1026:69: missing terminating ' character make[1]: *** [glob.o] Error 1 make[1]: Leaving directory

Re: [PATCH] silent job monitor when 'set +m'

2009-11-11 Thread Chet Ramey
> oups sorry you want to see the other errors from kill ... Then invoke kill before redirecting stderr. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~c

Re: [PATCH] silent job monitor when 'set +m'

2009-11-11 Thread Chet Ramey
> > Nothing wrong, but can be made more efficient because "| grep" means > > another subprocess which can be eliminated if the shell silents the > > Terminate command in the first place. Then why not try the approach I outlined in the previous message, instead of sticking with something that you d