Freestone wrote:
coastie,
I'm new here and I don't want to butt in or be rude.
I did, however, try running your script and I was getting errors also. This is what I did to fix the errors:
I changed the input section a little bit...very small change to avoid the errors.
Changed:
Code:
if [[input=1]]
to:
Code:
if [[ input = 1 ]]
...and the same for input =2.
I know you didn't ask me an I apologize for being rude if I was. I'm here to learn and I learned from you and if I can help in return, that is all I want to do!!!
Cool little script!!!
The question I have is when it asks for input '1' or '2' to exit or continue. When it hits 'read', is there a way to prevent it from actually printing the '1' or '2' on the screen and jump right into exiting or continuing?
Freestone
yes... instead of the standard "read" command you could do a
Code:
echo "What would you like to do now?"
echo "1: exit"
echo "2: continue"
read -s -n 1 input
using the terminal..... i simply typed "man read" ..... it's a bash builtin, so i had to scroll down..... there i saw the entry for read and then looked at the options.... the options i used...
-s Silent mode. If input is coming from a terminal, characters are not echoed.
-n nchars
read returns after reading nchars characters rather than waiting for a complete line of input.
FWIW .... no question is stupid, and we will be HAPPY to help you
