Maarten Billemont wrote:
On 08 Apr 2012, at 21:30, Chet Ramey wrote:
On 4/8/12 3:02 PM, Maarten Billemont wrote:
Any particular reason for not removing old undocumented functionality, or is
that mostly the nature of this beast - dragging along and maintaining ancient
code for the sake of
In article ,
Linda Walsh wrote:
>>> Because, as Linda discovered, there is still working code out there using
>>> it. Maybe we'll get to a point where it's all gone, but we're not there
>>> yet.
>>
>> IMO, the working code out there that relies on $[...] either runs on
>>older versions of bash.
What should be the behavior of the following?
if cmd1
then
cmd2
fi && if cmd3
then
cmd4
fi
I've not joined two if's with a short-circuit boolean before, but I'm
suddenly working on a script where someone else has.
Playing around, it appears that cmd1 and cmd3 have no direct impact on
the
On Mon, Apr 9, 2012 at 8:31 PM, Dan Stromberg wrote:
>
> What should be the behavior of the following?
>
> if cmd1
> then
> cmd2
> fi && if cmd3
> then
> cmd4
> fi
>
> I've not joined two if's with a short-circuit boolean before, but I'm
> suddenly working on a script where someone else has.
On Mon, Apr 9, 2012 at 1:40 PM, Pierre Gaston wrote:
> On Mon, Apr 9, 2012 at 8:31 PM, Dan Stromberg wrote:
>>
>> What should be the behavior of the following?
>>
>> if cmd1
>> then
>> cmd2
>> fi && if cmd3
>> then
>> cmd4
>> fi
>>
>> I've not joined two if's with a short-circuit boolean bef
On Mon, Apr 9, 2012 at 1:31 PM, Dan Stromberg wrote:
>
> What should be the behavior of the following?
>
> if cmd1
> then
> cmd2
> fi && if cmd3
> then
> cmd4
> fi
>
> I've not joined two if's with a short-circuit boolean before, but I'm
> suddenly working on a script where someone else has.
On 09.04.2012 19:31, Dan Stromberg wrote:
>
> What should be the behavior of the following?
>
> if cmd1
> then
> cmd2
> fi && if cmd3
> then
>cmd4
> fi
If cmd1 is true then execute cmd2;
cmd2 defines the exit code for the first if
depending on cmd2 return value,
if true then the subs
Maarten Billemont wrote:
Any particular reason for not removing old undocumented functionality,
or is that mostly the nature of this beast - dragging along and maintaining
ancient code for the sake of compatibility?
So 'yesturday' is "ancient" for you?... that's really means somet
Janis Papanagnou wrote:
> Dan Stromberg wrote:
> > What should be the behavior of the following?
> > if cmd1
> > then
> > cmd2
> > fi && if cmd3
> > then
> > cmd4
> > fi
Hello Daniel and Janis!
> If cmd1 is true then execute cmd2;
> cmd2 defines the exit code for the first if
> dependin
On 4/9/12 9:07 PM, Linda Walsh wrote:
>
>
> Maarten Billemont wrote:
>
>> Any particular reason for not removing old undocumented functionality,
>> or is that mostly the nature of this beast - dragging along and maintaining
>> ancient code for the sake of compatibility?
>
> So 'yesturday' is "
If false; then
echo jj
fi
always has to return 0 otherwise a lot of code using ERREXIT/ERRTRACE
would break.
if you want to handle an error case you should use elif or else
your example could be written like this
if cmd1
then
cmd2
elif cmd3
then
cmd4
fi
or possibly like this
if cmd1
Sure, a comment can be used to place a line in your history but that
doesn't really address the examples I had. Just seems to me like a
lone semicolon could be treated as a newline/noop. I can't seem to
think of anything that this would break but, of course, that doesn't
mean it wouldn't. The en
Here is another example that appears to defy my expectations. In this
case, the semicolon is allowed:
sine:~$ hello='echo hello'
sine:~$ world='echo world'
sine:~$ ${hello};${world}
hello
world
sine:~$ unset hello
sine:~$ ${hello};${world}
world
sine:~$ unset world
sine:~$ ${hello};${world}
Than
Also, I just wanted to send out a thanks to Chet Ramey and everyone
else that has contributed to bash. I am a bash junkie and use it
every day. Not only is bash my primary interactive shell, it is also
the scripting language that I write many of my programs in... and it
glues together many of the
My two cents, would be to add a bit to the man page that says something like:
---
For historical reasons, the following format is also supported for
arithmetic evaluation:
$[expression]
Note, however, that this format is non-standard and that
$((expression)) is preferred.
---
At least t
In article
,
bsh wrote:
> Janis Papanagnou wrote:
> > Dan Stromberg wrote:
> > > What should be the behavior of the following?
> > > if cmd1
> > > then
> > > cmd2
> > > fi && if cmd3
> > > then
> > > cmd4
> > > fi
>
> Hello Daniel and Janis!
>
> > If cmd1 is true then execute cmd2;
>
16 matches
Mail list logo