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

Use backquotes ` rather than single quotes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.