bc throwing coredump

Hi Gurus,
I tried bc 1000 % 10 on tcsh and ksh and its throwing a core dump on a sun solaris machine.
uname -a
SunOS azote 5.9 Generic_118558-39 sun4u sparc SUNW,Ultra-4
Please let me know if you find anything.

Thanks,
Kinny

using bash shell:-

X=$(echo "1000%10" | bc)
echo $X

What calculation are you trying to do?

It says Illegal variable name.

Even echo "1000%10" | bc gives me a core dump.
Please advise

---------- Post updated at 06:08 AM ---------- Previous update was at 06:07 AM ----------

I am just trying to get the reminder of 1000 divided by a user passed variable

This would suggest that your copy of "bc" is corrupt or from a different system.

Just for diagnostics.

Find out which program failed.
file core

Check whether you are actually running /usr/bin/bc
type bc

Try /usr/bin/bs to eliminate whether /usr/bin/bc is the only problem
echo "100%9"|bs
1

I had said in my post that you have to have a bash shell to do my code above

try writing the below:-

bash
X=$(echo "1000%10" | bc)
echo $X

Hi Ahmad,
I tried this with bash and I get no output.

bash-2.00$ X=$(echo "1000%9" | bc);echo $X

bash-2.00$ X=$(echo "1000%10" | bc);echo $X

bash-2.00$

---------- Post updated at 08:39 AM ---------- Previous update was at 08:36 AM ----------

bash-2.00$ bc
1000%3
Abort (core dumped)
bash-2.00$

Can you please post the output of these 2 commands:

$ file ` which bc`
$ ldd -r `which bc`

And the same for "dc" (the program which "bc" calls).

Do other programs in the SUNWesu package work?
e.g. cal , sum