Skip to main content
18 events
when toggle format what by license comment
Dec 11, 2020 at 1:24 history edited user445702 CC BY-SA 4.0
added 108 characters in body
Dec 10, 2020 at 23:57 history edited user445702 CC BY-SA 4.0
added 19 characters in body
Dec 10, 2020 at 23:34 comment added user445702 Yes I am trying to pass the 3 arguments as arguments so that I will be able to enter 3 numbers, and they will be the price, tax and tip and then the program will return the total price at the end
Dec 10, 2020 at 23:29 comment added Gordon Davisson Are you trying to pass the 3 arguments as arguments (i.e. entered on the command line after the script name, before you press return to start running the script), or are you expecting the script to read them from the user after it starts running? $1, $2, etc only work with actual arguments. Also, some of those error messages look like you might have DOS/Windows line endings in your script file (see here). If it does, that'll need to be fixed.
Dec 10, 2020 at 23:04 history edited user445702 CC BY-SA 4.0
added 218 characters in body
Dec 10, 2020 at 21:12 review Close votes
Dec 25, 2020 at 3:01
Dec 10, 2020 at 20:59 history edited user445702 CC BY-SA 4.0
added 326 characters in body
Dec 10, 2020 at 20:55 vote accept user445702
Dec 10, 2020 at 20:41 answer added user000001 timeline score: 1
Dec 10, 2020 at 20:16 history edited user445702 CC BY-SA 4.0
Added the error messages
Dec 10, 2020 at 19:58 comment added Kusalananda @user445702 Please update the question with that information, and also how you call the script.
Dec 10, 2020 at 19:52 comment added user445702 The 1st input and 2nd input are the the price of the meal, the tax that I pay for the meal, and the 3rd input is the tip. The error messages are: stinput: command not found and then : command not found repeated twice
Dec 10, 2020 at 18:25 comment added ilkkachu What is the code supposed to do? What are $1stinput, $2ndinput etc? What do you mean it "either not runs, or runs with errors"? Which one is it? What errors do you get?
Dec 10, 2020 at 18:08 comment added Chris Davies Please add to your question how you're trying to run this code. Please also add the actual error messages you're receiving, so that someone here can explain to you what they mean - and therefore how you should fix them
Dec 10, 2020 at 17:49 history edited user445702 CC BY-SA 4.0
added 178 characters in body
Dec 10, 2020 at 15:53 history edited user445702 CC BY-SA 4.0
Shellchecked to fix all errors
Dec 10, 2020 at 6:48 comment added thanasisp It is good to shell check your code for obvious things that need fixing, and then update your question with what exactly will not be working. Currently, almost every line needs fixing in order to become valid bash syntax.
Dec 10, 2020 at 3:28 history asked user445702 CC BY-SA 4.0