syntax problem

Dear friends,

I am writing shell script in csh .

i want to make arthimatic operation in csh.

i wrote sysntax like this.
set val = 230
set tmp = `0.1 * $val + 300`
echo $tmp

but it is not working .

anyone please give me syntax.

I dont think that csh supports direct math operations. You would have to use expr to do any math. And then expr does not support non integer operations.

Try doing something like this:

set val = 230
echo $val
set tmp = `echo 0.1 \* $val + 300|bc`
echo $tmp

The '@' command in csh does processing of arithmetic expressions.

See the man page for csh.

Google for ``Csh scripting considered harmful'' for some good reasons why you
should try to avoid scripting in csh.