LinuxQuestions.org
Register a domain and help support LQ
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 08-06-2008, 05:20 AM   #1
khaos83
Member
 
Registered: Dec 2007
Posts: 97

Rep: Reputation: 15
How to simulate a ENTER key pressing


I am doing this: Enter a command then press enter once to clear away some message that will pop out, then repeat.

Code:
1) *enter command*
2) *press enter to clear away message*
repeat ~~~
I want to automate the process using linux scripting but i can't seem to simulate pressing of ENTER key to clear away the message.

Any idea how to ?
 
Old 08-06-2008, 05:27 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Show what you have you tried, and what has failed.
 
Old 08-06-2008, 05:41 AM   #3
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Have a look at this thread to see how to get the keystrokes from a script. The example is taken from the Advanced Bash Scripting Guide, example 15-59.
 
  


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
Leave vi mode without pressing enter ? Vilius Linux - General 4 11-13-2007 05:12 AM
Blank the screen on pressing key: possible? arrenlex Linux - Software 2 12-26-2005 05:09 PM
Pressing 'alt 1' key twantrd Linux - General 2 01-07-2005 01:05 AM
Mandrake 10 doesnt install after pressing enter subliminal Mandriva 9 06-17-2004 04:04 PM
I did the following program and get blank line after pressing <ENTER> purpleburple Programming 5 08-21-2002 01:00 PM


All times are GMT -5. The time now is 05:17 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration