Re: read not terminated with EOF/^D when -n or -N is used

2010-12-27 Thread Stephane CHAZELAS
2010-12-26, 18:19(-05), Isaac Good: [...] > read <^D> -> the EOF terminates read and it exists with a false > exist status. > read -n4 <^D> -> the ^D is read by read and stored in REPLY. read > does not terminate. It's not bash that handles the ^D, it's the terminal. When in canonical mo

Re: $? in the right side of a pipe

2010-12-27 Thread dnade.ext
Hello More information on that topic : false ; false | echo $? stills prints 0. false ; (false) | echo $? prints 1 So.. ? $? in the right side of a pipe is randomly the exit status of the left side depending of the way you write it ? Doesn’t sound sane. Doesn’t that break POSIX anyway

Re: $? in the right side of a pipe

2010-12-27 Thread Stephane CHAZELAS
2010-12-27, 13:14(+01), : > Hello > > More information on that topic : > > false ; false | echo $? stills prints 0. > false ; (false) | echo $? prints 1 > > So.. ? $? in the right side of a pipe is randomly the exit > status of the left side depending of the way you write it ? > Doesn’t soun

Re: read builtin does not return success code (0) in spite of it successfully read line

2010-12-27 Thread Eric Blake
On 12/26/2010 01:29 PM, Stephane CHAZELAS wrote: > Bash behavior is the same as every other shell, is as documented > and as specified by POSIX. POSIX requires that the input to read be a text file. Since you aren't passing a text file, the behavior is undefined. POSIX does NOT require bash to r

Re: $? in the right side of a pipe

2010-12-27 Thread dnade.ext
Hello More information on that topic : false ; false | echo $? stills prints 0. false ; (false) | echo $? prints 1 So.. ? $? in the right side of a pipe is randomly the exit status of the left side depending of the way you write it ? Doesn’t sound sane. Doesn’t that break POSIX anyway

Manual: variable SIGWINCH has no definition

2010-12-27 Thread Christophe Jarry
Dear developers, While reading http://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-COLUMNS-179 today, I found variable SIGWINCH has no definition. Please add the definition of the variable SIGWINCH in http://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html.

Manual: `select' builtin command not present in "Index of Shell Builtin Commands"

2010-12-27 Thread Christophe Jarry
Dear developers, Today, I read http://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-COLUMNS-179 and discovered that `select' builtin command was not present in http://www.gnu.org/software/bash/manual/html_node/Builtin-Index.html#Builtin-Index although it was present in http:

Re: Manual: variable SIGWINCH has no definition

2010-12-27 Thread Greg Wooledge
On Mon, Dec 27, 2010 at 04:42:14PM +0100, Christophe Jarry wrote: > today, I found variable SIGWINCH has no definition. That's not a variable name. It's the name of a signal. See `kill -l' or `man 7 signal' (or wherever the definition of signals resides on your operating system).

Re: Manual: `select' builtin command not present in "Index of Shell Builtin Commands"

2010-12-27 Thread Chet Ramey
> Dear developers, > > Today, I read > http://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-COLUMNS-179 > and discovered that `select' builtin command was not present in > http://www.gnu.org/software/bash/manual/html_node/Builtin-Index.html#Builtin-Index > although it was pr

Re: read builtin does not return success code (0) in spite of it successfully read line

2010-12-27 Thread Stephane CHAZELAS
2010-12-27, 09:43(-07), Eric Blake: [...] > On 12/26/2010 01:29 PM, Stephane CHAZELAS wrote: >> Bash behavior is the same as every other shell, is as documented >> and as specified by POSIX. > > POSIX requires that the input to read be a text file. Since you aren't > passing a text file, the behav

Re: read builtin does not return success code (0) in spite of it successfully read line

2010-12-27 Thread Eric Blake
On 12/27/2010 10:59 AM, Stephane CHAZELAS wrote: > 2010-12-27, 09:43(-07), Eric Blake: > [...] >> On 12/26/2010 01:29 PM, Stephane CHAZELAS wrote: >>> Bash behavior is the same as every other shell, is as documented >>> and as specified by POSIX. >> >> POSIX requires that the input to read be a tex

Re: read builtin does not return success code (0) in spite of it successfully read line

2010-12-27 Thread Stephane CHAZELAS
2010-12-27, 11:53(-07), Eric Blake: [...] >> So I think you can expect a non-zero status here. > > All you can expect is that you have undefined results. Undefined > results include zero status. [...] Yes, sorry, you're right. Bad reasoning of mine. The >0 on EOF is oviously on end of text file,