bash scripting problem

  • From: Daniel Dalton <daniel.dalton47@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sun, 02 Dec 2007 17:30:32 +1100

Hi,

I am learning to shell script. One of my tasks is to print the value of two numbers been added together. But first that final value must be assigned to
a variable. So I write: #!/bin/bash #Print the value of 2 numbers added

x=10 y=15 z=$x+$y echo $z exit 0

I get 10 +15 as the output.

I want to get 25. What am I doing wrong?

-- Daniel Dalton
http://members.iinet.net.au/~ddalton/
daniel.dalton47@xxxxxxxxx
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: