On Thu, Oct 11, 2012 at 08:01:40PM -0700, Tinni wrote:
> I am very new to the shell scripting.. Need some pointers for getting the
> return value in shell scripting.
"Return value" is an integer from 0 to 255. That's not what you want.
> I want the values ( db_host_user, db_host, ORACLE_SID)
On Thu, 11 Oct 2012 20:01:40 -0700 (PDT), Tinni wrote:
>
> I am very new to the shell scripting.. Need some pointers for getting
> the return value in shell scripting.
comp.unix.shell
Why doesn't it exit the shell?
$ set -e
$ echo $(false)
Shouldn't the error code of $(false) command substitution be checked by set -e
before passing stdout to the echo builtin?
Isn't it the most logical behavior that most people would expect of set -e?
Bash version: GNU bash, version 4.2.24(
On Fri, Oct 12, 2012 at 06:55:28AM -0400, Sergey Fadeev wrote:
> Why doesn't it exit the shell?
> $ set -e
> $ echo $(false)
Because the exit status of echo is 0.
On 10/12/12 06:55, quoth Sergey Fadeev:
Why doesn't it exit the shell?
$ set -e
$ echo $(false)
Shouldn't the error code of $(false) command substitution be checked by set
-e before passing stdout to the echo builtin?
Isn't it the most logical behavior that most people would expect of se
On 10/10/12 10:38 AM, Wladimir Sidorenko wrote:
> Dear all,
>
> After running the following command:
>
> $ ! test 0 -eq 0
>
> I can see different exit codes in $? and ${PIPESTATUS[@]}. Here, what I get
>
> $ ! test 1 -eq 0 ; echo $? ${PIPESTATUS[@]}
> 0 1
>
> $ ! test 0 -eq 0 ; echo $? ${PIPE
Ok, thanks. I'll notice this for the future. It's of course arguable,
whether PIPESTATUS stores a true value, since the '!' inversion
keyword gets ignored in this case. But if it was intended, than it's
ok.
2012/10/13 Chet Ramey :
> On 10/10/12 10:38 AM, Wladimir Sidorenko wrote:
>> Dear all,
>>
>
On 10/12/2012 03:36 PM, Wladimir Sidorenko wrote:
> Ok, thanks. I'll notice this for the future. It's of course arguable,
> whether PIPESTATUS stores a true value, since the '!' inversion
> keyword gets ignored in this case. But if it was intended, than it's
> ok.
Consider:
$ f() { return 2; }
$