LinuxQuestions.org
Review your favorite Linux distribution.
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, 03: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 05:00 AM.
 
Old 07-23-2012, 03:32 AM   #2
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 528

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

Code:
/your/command | yes ""
 
Old 07-23-2012, 11:44 AM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,029

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

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
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, 04: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 08: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 08:01 AM
[SOLVED] Pass Shell Script to Background Process tg3793 Linux - Newbie 8 11-04-2011 01:53 PM
"Enter Key" not working, how to map "Enter Key" functionality to "F9" Key srinihi Linux - Newbie 1 04-03-2009 03:46 PM
how to send enter key to script? rabbit2345 Programming 13 03-09-2009 05:48 PM
MDCrack cracks key with pass but not pass with key?... lynx5 Linux - Security 1 02-02-2008 06:49 PM


All times are GMT -5. The time now is 05:35 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration