0

hi friends i am new to shell programming and learning bourne shell....this is the syntax i am using

a=10.0 b=20.0
c='echo $a+$b|bc'    #wanted to add two variables in c
echo $c

this is the .sh file that i have created but when run in terminal,it is showing "echo $a+$b" not the 30.0 that's what i want ........i am using ubuntu terminal.....plez help for this code and also is bourne shell scripting better or perl ?........thanks in advance

Edited by mike_2000_17: Fixed formatting

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by shibblez
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.