LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2012, 02:07 AM   #1
KaRt
LQ Newbie
 
Registered: Jul 2012
Location: india
Posts: 28

Rep: Reputation: Disabled
Red face script for pass the ENTER key in a process


while my apps installation it asks many times to hit a enter key i want to pass the enter key from script that means without
user interaction.. help me out....

Last edited by KaRt; 07-26-2012 at 04:00 AM.
 
Old 07-23-2012, 02:32 AM   #2
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542

Rep: Reputation: 79
did you try with "yes"

Code:
/your/command | yes ""
 
Old 07-23-2012, 10:44 AM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
i think this is what expect was designed for.
 
Old 07-23-2012, 10:53 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,681

Rep: Reputation: 8154Reputation: 8154Reputation: 8154Reputation: 8154Reputation: 8154Reputation: 8154Reputation: 8154Reputation: 8154Reputation: 8154Reputation: 8154Reputation: 8154
Quote:
Originally Posted by KaRt View Post
i ll write script for zimbra desktop . while a installation it asks many times to hit a enter key i want to pass the enter key from script that means without
user interaction.. help me out....i used some concepts but it doesnt work...
Aside from the advice given, how about posting what you've written so far, and tell us what 'concepts' you've tried, and what you mean by "doesn't work"?
 
1 members found this post helpful.
Old 07-26-2012, 03:59 AM   #5
KaRt
LQ Newbie
 
Registered: Jul 2012
Location: india
Posts: 28

Original Poster
Rep: Reputation: Disabled
Wink thanks

through the argument passing i am done the script.thanks for all your Suggestion.

create a temporary file with your requirments and redirect it to your script.
like
cat>>"/tmp/test/"<<EOF
cmd1
cmd2
cmd3
EOF
and redirect this to your script
for ex
./myapp < /tmp/test/
and then remove your temporary file

Last edited by KaRt; 07-26-2012 at 07:32 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to Hit 'Enter' key multiple times in bash script. nithinmp Ubuntu 7 07-19-2012 07:01 AM
[SOLVED] Pass Shell Script to Background Process tg0000 Linux - Newbie 8 11-04-2011 12:53 PM
"Enter Key" not working, how to map "Enter Key" functionality to "F9" Key srinihi Linux - Newbie 1 04-03-2009 02:46 PM
how to send enter key to script? rabbit2345 Programming 13 03-09-2009 04:48 PM
MDCrack cracks key with pass but not pass with key?... lynx5 Linux - Security 1 02-02-2008 05:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration