How to write a shell script to automatically accept return key with out user intervention?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to write a shell script to automatically accept return key with out user intervention?
# 1  
Old 04-11-2012
How to write a shell script to automatically accept return key with out user intervention?

Hi Friends,

i am creating a shell script which is accepting file name as input parameter from Java and invoking finacle service.
The service will accpet text file,B2k_session id,etc and upload the text file data in finacle database.

My shell script looks like this:-

#! /bin/ksh
text_file=$1
. /etc/b2k/DFS10402/FINCORE/com/commonenv.com
$TBA_E/mcbx4005 1673:00:B $text_file N ALL //calling finacle service

But after executing finacle service it is asking me to Press <RETURN> key to exit ...

We want to automate the process with out user intervention.

How to write a shell script to automatically accept return key with out user intervention?


Thanks,
Venkat Vadlamudi.
# 2  
Old 04-11-2012
Try redirecting /dev/null into its standard input. The prompt might just not wait when standard input can't be read.
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 04-11-2012
Quote:
Originally Posted by Corona688
Try redirecting /dev/null into its standard input. The prompt might just not wait when standard input can't be read.


Got it..iam able to skip entering return key by redirecting /dev/null into its standard input

Last edited by vadlamudy; 04-11-2012 at 05:29 PM..
This User Gave Thanks to vadlamudy For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

• Write a shell script that upon invocation shows the time and date and lists all the logged-in user

help me (1 Reply)
Discussion started by: sonu pandey
1 Replies

2. UNIX for Dummies Questions & Answers

To ask for user intervention

hi guys i want my cron to execute for every minute (5 Replies)
Discussion started by: azherkn3
5 Replies

3. Shell Programming and Scripting

Shell script to accept user input on the fly

I want a shell script that accepts user input simultaneously when performing other tasks. Example: A shell script should echo some messages on the console and when the user presses some keys it should respond to that action. say, when user presses the key A - more information should be printed... (2 Replies)
Discussion started by: Arun_Linux
2 Replies

4. Shell Programming and Scripting

how to write bash script that will automatically extract zip file

i'm trying to write a bash script that that will automatically extract zip files after the download. i writed this script #!/bin/bash wget -c https://github.com/RonGokhle/kernel-downloader/zipball/master CURRENDIR=/home/kernel-downloader cd $CURRENDIR rm $CURRENDIR/zipfiles 2>/dev/null ... (2 Replies)
Discussion started by: ron gokhle
2 Replies

5. Shell Programming and Scripting

How to enter a return key in bash script?

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

6. Shell Programming and Scripting

SQL PLUS Command 'ACCEPT' is not waiting for user input with sh shell script

Dear All, The sqlplus 'Accept' command is not waiting for user input when I include the command within a shell script. Note: The 'Accept' command is working fine if I execute it in a SQLPLUS Prompt. Please fins the below sample script which i tried. SCRIPT: -------- #!... (4 Replies)
Discussion started by: little_wonder
4 Replies

7. Shell Programming and Scripting

shell script that will automatically check if specifed user is log in or not, in 30 seconds

guys I need emergency help with below shell script assignment..am new to shell script Write a Shell script to automatically check that a specified user is logged in to the computer. The program should allow the person running the script to specify the name of the user to be checked, the... (2 Replies)
Discussion started by: gurmad
2 Replies

8. Shell Programming and Scripting

Script to login to attached SUN Storage through Solaris m/c w/o user intervention

I want to create a shell script to CLI login to attached SUN 6140 storage from Sun Solaris 9 m/c (instead of using CAM ) but that prompts me for password despite the fact that i am adding them in script .. i am using "expect" feature for this .. however as i never used "expect " before .. so... (0 Replies)
Discussion started by: yogesh29sharma
0 Replies

9. Shell Programming and Scripting

How to use ssh command in the shell script without user intervention?

Hello All, I need your help, i would like to know how to use ssh command in the shell scripts? and make the script continue to enter the password without user intervention example of the normal commands written manually: # ssh 172.30.1.256 -l mxread password: mxread Thanks in advance (3 Replies)
Discussion started by: Dendany83
3 Replies

10. Shell Programming and Scripting

How to include RETURN KEY with Background process "&" in Shell Script

Hello All, I am a newbie in Shell script programming, and maybe you can help me with my query. I need to write a shell script (mntServer.ksh) that will start a background process and also to be able to run another script. The mntServer.ksh script contains: #!/bin/ksh... (1 Reply)
Discussion started by: racbern
1 Replies
Login or Register to Ask a Question