Linda Walsh wrote:
Was trying a combo if statement with normal [[]] eval and an arith
exp.
in my ENV, (chose a number var at random), LINES=66
So:
echo "LINES=$LINES"
LINES=66
if [[ -z "" && ((LINES == 66 )) ]]; then echo foo; fi
foo
But:
if [[ -z "" && ((LINES < 80 )) ]]; then echo fo
Was trying a combo if statement with normal [[]] eval and an arith
exp.
in my ENV, (chose a number var at random), LINES=66
So:
echo "LINES=$LINES"
LINES=66
if [[ -z "" && ((LINES == 66 )) ]]; then echo foo; fi
foo
But:
if [[ -z "" && ((LINES < 80 )) ]]; then echo foo; fi
(prints nothing).
Linda Walsh writes:
> if [[ -z "" && ((LINES < 80 )) ]]; then echo foo; fi
> (prints nothing)
>
> What am I missing?
"LINES" does not sort before "80".
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for
Andreas Schwab wrote:
Linda Walsh writes:
if [[ -z "" && ((LINES < 80 )) ]]; then echo foo; fi
(prints nothing)
What am I missing?
"LINES" does not sort before "80".
Andreas.
But it compares == to 66?
Normally, in the shell, if you type in something in double parens
it does a m
pjodrr wrote:
Hello,
Am Dienstag, 15. März 2011 21:44:37 UTC+1 schrieb Chet Ramey:
The bash-4.1 solution, though it modified what the user typed, did not
result in any ambiguity. A filename was a filename, and if it contained
characters that needed to be quoted, readline did so.
I might be
On 7/10/11 6:33 PM, Linda Walsh wrote:
>
>
> Andreas Schwab wrote:
>
>> Linda Walsh writes:
>>
>>> if [[ -z "" && ((LINES < 80 )) ]]; then echo foo; fi
>>> (prints nothing)
>>>
>>> What am I missing?
>>
>> "LINES" does not sort before "80".
>>
>> Andreas.
>>
>
> But it compares == to 66?
Chet Ramey wrote:
so I'd expect the above to eval my shell-var, 'lines'...
AhI seeI need another set of parens!...
(ARG!!
What rule should I have remembered to 'know' that?
The rule you need is in the manual. In a conditional expression parens
only serve to override normal
On 7/10/11 6:41 PM, Linda Walsh wrote:
>
>
> pjodrr wrote:
>
>> Hello,
>>
>> Am Dienstag, 15. März 2011 21:44:37 UTC+1 schrieb Chet Ramey:
>>> The bash-4.1 solution, though it modified what the user typed, did not
>>> result in any ambiguity. A filename was a filename, and if it contained
>>> c