Sponsored Content
Full Discussion: Can someone please help....
Top Forums Shell Programming and Scripting Can someone please help.... Post 302846665 by jefferj54 on Sunday 25th of August 2013 11:24:29 AM
Old 08-25-2013
Need help with "case statement" and :while loop"..

..with how to use basic arithmetic options in a case state statement and then loop them with say, a "while" loop? Please be gentle as I am definitely a newbie.

Example: I need a very simple option "case statement" for these all together.

Code:
sum=$((num1 + num2))
diff=$((num1 - num2))
prod=$((num1 *\ num2))
quot=$((num1 / num2))

and then "while" looped.

thanks a bunch,

joe.

Last edited by jefferj54; 08-25-2013 at 01:12 PM.. Reason: Please use code tags
 
All times are GMT -4. The time now is 10:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy