[: too many arguments
Hey!
I am trying to find the output of the piece of code below: Quote:
line 4: [: too many arguments I don't understand the error. When I modified it a little : Quote:
then also an error is shown line 5: syntax error near unexpected token `$x' line 5: `if [ ( $x % 2 ) -eq ( $y % 3 ) ]' Is there a limitation to the arguments inside test ([) command ?? Please help! |
Try it this way:
Code:
if [ $(( x % 2 )) -eq $(( y % 3 )) ];then |
Thanks Man!!
It worked. |
All times are GMT -5. The time now is 01:04 AM. |