Hey, I'm writing this BASH script, I recently started learning BASH after I did Java and I'm pretty new to the syntax.
Anways, what I want to do is simple, I coudn't find the right information though:
Let's say I make a :
read -p "Press ENTER to go back to menu" choice
.....
What is the command that would let me perform this? I need to way for the User to press ENTER, not a silly Y/N. (It's for general accomplishment actually haha).
Your code will work as is.
The script will wait until the user presses ENTER. You might add an -s option to prevent any other characters being echoed to the screen, and you don't need a variable name since you aren't going to check it:
I'm working on making a menu system on an HP-UX box with Bash on it. The old menu system presents the users with a standard text menu with numbers to make selections. I'm re-working the system and I would like to provide something more akin to iterative search in Emacs.
I have a list of 28... (2 Replies)
I'm trying to learn how to get my script to execute the enter button when it telnets into a router and the router displays output but you need to press the space bar or enter button to continue displaying my output of the router.
How is this done? (0 Replies)
Hi,
I'm porting an install script from AIX to Red Hat (2.6.18-164.el5 #1 SMP)
I have this script working in both AIX and HP-UX.
The script is a wrapper for a Micro Focus Server Express install program. It responds to the install program questions with a here-now list. Responses includes... (14 Replies)
hi,
i've bash script thats working...
but now i need to add a line....that prompts for user input....like yes and 1 as complete install....
so here's how it looks...
$ cd 9200 (cd into directory)
$./install (hv to type ./install to run install then ask for)
----do you want to... (4 Replies)
I am looking for a way to start a script and have it prompt for a password that will be used later on in the script to SSH to another host and to SFTP. I don't want the password to be hard coded. Below is my script with the actual IP's and usernames removed.
#!/usr/bin/expect -f... (2 Replies)
I have a script in which we have used nohup. Once script is executed it will be terminated only when enter key is pressed. I want the script to be terminated without pressing enter key
nohup imqbrokerd -name user_id port 2>1 1>$home_`date` &
I am a newbie to shell, Kindly please help (3 Replies)
Discussion started by: Suganbabu
3 Replies
LEARN ABOUT POSIX
run
run(1F) FMLI Commands run(1F)NAME
run - run an executable
SYNOPSIS
run [ -s] [-e] [-n] [-t string] program
DESCRIPTION
The run command runs program, using the PATH variable to find it. By default, when program has completed, the user is prompted (Press ENTER
to continue:), before being returned to FMLI. The argument program is a system executable followed by its options (if any).
OPTIONS
The following options are supported:
-e If -e is specified, the user will be prompted before returning to FMLI only if there is an error condition
-n If -n is specified, the user will never be prompted before returning to FMLI (useful for programs like vi, in which
the user must do some specific action to exit in the first place).
-s The -s option means "silent", implying that the screen will not have to be repainted when program has completed.
Note that the -s option should only be used when program does not write to the terminal. In addition, when -s is
used, program cannot be interrupted, even if it recognizes interrupts.
-tstring If -t is specified, string is the name this process will have in the pop-up menu generated by the frm-list command.
This feature requires the executable facesuspend (see face(1)) to suspend the process and return to the FMLI appli-
cation.
EXAMPLES
Example 1: Sample output of run command
Here is a menu that uses run:
menu="Edit special System files"
name="Password file"
action=`run -e vi /etc/passwd`
name="Group file"
action=`run -e vi /etc/group`
name="My .profile"
action=`run -n vi $HOME/.profile`
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO face(1), attributes(5)SunOS 5.10 17 Nov 1999 run(1F)