Menu

[Solved]Getting Syntax Error 0 0 Syntax Error Operand Expected Error Token 0 0 Part S Bold Printth Q37055032

why am I getting a syntax error for    ((: ==0 || ==0:syntax error: operand expected (error token is “==0 || ==0”)   (part that’s bold)

Printthis(){

Print “*******************”

}

Head(){

printf “First side t Second side t Hypotenuse”

}

if [ $# == 2 ]; then

if (( $1 == 0 || $2 == 0 ))

then

echo “cant be zero “

exit 1

fi

printf ” calculated from input”

Head

Hyp=`1./hyp$1$2`

Printthis

printf “$1t$2t”

else

print “file processed”

Head

while read line

do

first=`echo $line | awk ‘{print$1}’`

second=`echo $line | awk ‘{print$2}’`

if (( $first == 0 || $second == 0 ))

then

echo “cant be zero”

exit 1

fi

Hyp=`./hyp $first $second`

printf “$firstt $secondt$Hyp”

Printthis

Done < math.data

fi

Expert Answer


Answer to why am I getting a syntax error for ((: ==0 || ==0: syntax error: operand expected (error token is “==0 || ==0”) (part t… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *