![]() |
|
|
#1 |
|
Newbie
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() |
expr:syntax error
Problem Statement: $x=10 $y=20 $expr $x * $y $expr: syntax error " Frnds i dont want to use $expr $x \* $y(the correct option) instead of $expr $x * $y to get the output 200." how can i execute the above program and still get the output '200'? ![]() |
|
|
|
|
|
#2 |
|
ƒ(ψ)=ΘΊΧφ
![]() |
Re: expr:syntax error
any reasons why not using \* ? saving keystrokes
echo "$x * $y" | bc
__________________
Please don't click here |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() |
Re: expr:syntax error
ya the answer u gave is correct but i want the way i hv written and executed. so any solution??? any modification required in any file......? |
|
|
|
|
|
#4 |
|
ƒ(ψ)=ΘΊΧφ
![]() |
Re: expr:syntax error
you can use the korn shell for that since it can distinguish between * as wildcard and * for multiplication.
|
|
|
|
|
|
#5 |
|
Newbie
Join Date: Apr 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() OS:
|
Re: expr:syntax error
You can use '' instead of "\"
expr $x '*' $y s This works in C Shell |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |