Search Results

Search: Posts Made By: zkapopou
7,860
Posted By zkapopou
Nice. Well if you have any luck, let me know. I'm...
Nice. Well if you have any luck, let me know. I'm pretty stuck.
7,860
Posted By zkapopou
Unfortunately, this isn't an option. For the...
Unfortunately, this isn't an option. For the assignment I must implement it so that the order does not matter.



Haven't quite figured it out yet. It current works on input that comes after...
7,860
Posted By zkapopou
Thanks. That takes care of some of it. The...
Thanks. That takes care of some of it. The other problem is the input order. The getops is fantastic for taking in one argument, but only if they are after a switch.
7,860
Posted By zkapopou
That's a really good idea, the logic definitely...
That's a really good idea, the logic definitely solves part of my problem, but for some reason I'm getting errors.


zak 153 % mymath.sh 7 7 -a
7
mymath.sh: line 52: ((: 0 += 1 : attempted...
7,860
Posted By zkapopou
Believe me, I would love to do just that;...
Believe me, I would love to do just that; however, like I stated above, the program must be able to accept multiple options (so if the user typed mymath -a -d -m -s 7 7, the script would output the...
7,860
Posted By zkapopou
Yep, just figured that out. Not the part I'm...
Yep, just figured that out. Not the part I'm having trouble with though. New code will do mymath -a 7 7 but not mymath 7 -d 7

fixed all of the functions, now use
case "$opt" in
a)...
7,860
Posted By zkapopou
Thanks for the help, but that's not allowed. ...
Thanks for the help, but that's not allowed.

Has to be in the form

mymath.sh [-options] [-args]

Valid examples:

mymath.sh -a 12 39
mymath.sh -m -d 44 17
mymath.sh 35 -a -d 88 -m
7,860
Posted By zkapopou
Problem with calculator script
I'm having some trouble implementing a basic calculator using command line options. The script is supposed to take (multiple) arguments -a,-d,-m,-s for addition, multiplication, division, and...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 09:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy