LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > anirudhm
User Name
Password

Notices


Rate this Entry

Simple Shell Script Calculator

Posted 11-05-2009 at 11:59 PM by anirudhm

Quote:
Originally Posted by anirudhm View Post
Hi,
Cant we try simple calculator script as below:


echo "enter first number"
read a
echo "enter second number"
read b
echo "enter operand"
read c
calc=`expr
$a "$c" $b`
echo the result is $calc[/QUOTE]
Posted in Uncategorized
Views 1295 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 10:55 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration