Search Results

Search: Posts Made By: montor
1,507
Posted By montor
O ... Thanks ... But it got the Syntax error. ...
O ... Thanks ... But it got the Syntax error.

Using "==" rather than -eq will get the difference result. However, I would like to know the reason that what make the -eq comparison ignored special...
1,507
Posted By montor
Thanks the quick reply. Case 1 : A=88^M ...
Thanks the quick reply.

Case 1 :
A=88^M
[ $A -eq '88' ] && echo "PASS"

Result:
PASS

Case 2:
A=88
[ $A -eq '88' ] && echo "PASS"

I have retest with single quote and got the same...
1,507
Posted By montor
Test command with special character not work
Hi all,

Case 1 :
A=88^M
[ $A -eq 88 ] && echo "PASS"

Result:
PASS

Case 2:
A=88
[ $A -eq 88 ] && echo "PASS"

Result:
PASS

I would like to know why Case 1 and Case 2 got the same...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 02:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy