01-05-2009
How to catch ENTER key inside the shell script?
Hi,
I have a script in which i have to ask user to press the ENTER key to proceed further. can you please help me how can i achive this in my scripting?
echo "All the executables builded Successfully "
echo " Press Enter to Go Back to the Main Menu"
read key
if [ $key == 13 ]
then
main_menu_selector
fi
Thanks in Advance.....
Plaban
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have tried to disable the CTRL-Z key inside a shell(sh) script using the command trap "`echo "Ctrl-Z key disabled"`" 20But I am not able to exit from the script after pressing CTRL-Z key.
How to proceed this? Need reply soon (11 Replies)
Discussion started by: suganthic
11 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Whenever i press the backspace key, a new line appears, i.e. it works like a enter key. :confused:
Thanks (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies
3. UNIX for Advanced & Expert Users
without pressing the enter key ..manually...
how can we read the enter key ..from the shell script..so that the script termintes automatically.
eg:
telnet a.b.c.d xxxx
now " how to read the enter key" tho terminate the script (1 Reply)
Discussion started by: bishweshwar
1 Replies
4. Shell Programming and Scripting
for automating telnet using shell script.....
as we enter alphabetic characters inside shell script...how can we do the same for the enter key......Is there any character for the enter key
so the enter key need not be pressed manually...... (3 Replies)
Discussion started by: bishweshwar
3 Replies
5. Shell Programming and Scripting
How to simulate enter key via shell script (2 Replies)
Discussion started by: proactiveaditya
2 Replies
6. Shell Programming and Scripting
I tried searching the forum for similar posts but its closed now.
Would appreciate any help on this.
I am trying to capture return value from a select query into a variable.
DB is Oracle
I am able to spool it to a file but I donot intend to use it.
Here is my script that does not work ;)
I... (27 Replies)
Discussion started by: monie2717
27 Replies
7. Shell Programming and Scripting
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)
Discussion started by: duker61
14 Replies
8. Shell Programming and Scripting
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)
Discussion started by: kernel11
4 Replies
9. Shell Programming and Scripting
Hi
I have a shell script like that
Main() {
DAY=$(date +"%d-%m-%Y")
TIME=$(date +"%T")
Command 1
Command 2
...
Command n
}
I would like to catch errors from all commands in Main() and write these errors into a file , something likes this:
Main
if < error >
then
echo... (3 Replies)
Discussion started by: bobochacha29
3 Replies
10. Shell Programming and Scripting
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 CENTOS
amcrypt-ossl-asym
AMCRYPT-OSSL-ASYM(8) System Administration Commands AMCRYPT-OSSL-ASYM(8)
NAME
amcrypt-ossl-asym - crypt program for Amanda asymmetric data encryption using OpenSSL
SYNOPSIS
amcrypt-ossl-asym [-d]
DESCRIPTION
amcrypt-ossl-asym uses OpenSSL to encrypt and decrypt data. OpenSSL is available from www.openssl.org. OpenSSL offers a wide variety of
cipher choices ( amcrypt-ossl-asym defaults to 256-bit AES) and can use hardware cryptographic accelerators on several platforms.
amcrypt-ossl-asym will search for the OpenSSL program in the following directories:
/bin:/usr/bin:/usr/local/bin:/usr/ssl/bin:/usr/local/ssl/bin.
GENERATING PUBLIC AND PRIVATE KEYS
RSA keys can be generated with the standard OpenSSL commands, e.g.:
$ cd /var/lib/amanda
$ openssl genrsa -aes128 -out backup-privkey.pem 1024
Generating RSA private key, 1024 bit long modulus
[...]
Enter pass phrase for backup-privkey.pem: ENTER YOUR PASS PHRASE
Verifying - Enter pass phrase for backup-key.pem: ENTER YOUR PASS PHRASE
$ openssl rsa -in backup-privkey.pem -pubout -out backup-pubkey.pem
Enter pass phrase for backup-privkey.pem: ENTER YOUR PASS PHRASE
Writing RSA key
To generate a private key without a passphrase, omit the -aes128 option. See openssl_genrsa(1) for more key generation options.
Note that it is always possible to generate the public key from the private key.
KEY AND PASSPHRASE MANAGEMENT
amcrypt-ossl-asym uses the public key to encrypt data. The security of the data does not depend on the confidentiality of the public key.
The private key is used to decrypt data, and must be protected. Encrypted backup data cannot be recovered without the private key. The
private key may optionally be encrypted with a passphrase.
While the public key must be online at all times to perorm backups, the private key and optional passphrase are only needed to restore
data. It is recommended that the latter be stored offline all other times. For example, you could keep the private key on removable media,
and copy it into place for a restore; or you could keep the private key online, encrypted with a passphrase that is present only for a
restore.
OpenSSL's key derivation routines use a salt to guard against dictionary attacks on the pass phrase; still it is important to pick a pass
phrase that is hard to guess. The Diceware method (see www.diceware.com) can be used to create passphrases that are difficult to guess and
easy to remember.
FILES
/var/lib/amanda/backup-privkey.pem
File containing the RSA private key. It should not be readable by any user other than the Amanda user.
/var/lib/amanda/backup-pubkey.pem
File containing the RSA public key.
/var/lib/amanda/.am_passphrase
File containing the passphrase. It should not be readable by any user other than the Amanda user.
SEE ALSO
amanda(8), amanda.conf(5), openssl(1), amcrypt-ossl(8)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHOR
Kevin Till <kevin.till@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
NOTES
1. www.openssl.org
http://www.openssl.org/
2. www.diceware.com
http://www.diceware.com/
Amanda 3.3.3 01/10/2013 AMCRYPT-OSSL-ASYM(8)