Computing.Net > Forums > Linux > Send keystrokes in console mode

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Send keystrokes in console mode

Reply to Message Icon

Name: Reginaldo
Date: July 24, 2003 at 08:07:16 Pacific
OS: Red Hat 7.2
CPU/Ram: P4-256
Comment:

Hi, folks!

Is there any way (or application) to send keystrokes to buffer in console mode on Linux, like some programs do in command line mode on Windows? (i.e. sendkey.exe)
I want to automate some tasks that requires user intervention on my Linux systems, and I already tried to search on the net for something like this, but without success.
I would be greatly thankful if some of you show me a solution.

PS: Sorry about my poor english, I'm brazilian :)



Sponsored Link
Ads by Google

Response Number 1
Name: nelfer
Date: July 24, 2003 at 11:00:15 Pacific
Reply:

What exactly is what you are trying to do?
te ayuda si hablo en espaņol?

There are some program, like "yes" that will send "yes" to the standard output, so you can pipe it.

For example:

yes | rm -r /temp

That will answer "yes" to every question that "rm" has, like "Delete regular file xxxxxx?"


0

Response Number 2
Name: David Perry
Date: July 25, 2003 at 05:31:00 Pacific
Reply:

For automating interactive tasks, have a look at expect.

http://expect.nist.gov/


0

Response Number 3
Name: Reginald0
Date: August 27, 2003 at 06:12:34 Pacific
Reply:

It's me again.

I finally decided to learn more about a program called "expect" that comes with the Red Hat CD-ROM and it does what I want. Moreover it's pretty easy to use.

Thanks a lot to David Perry for his tip.

Reginald0


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Ftp chmod RH9.1 Floppy Boot corrupt



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Send keystrokes in console mode

How do I tell how much HD free space I have in the console www.computing.net/answers/linux/how-do-i-tell-how-much-hd-free-space-i-have-in-the-console/1519.html

Stuck in console mode. www.computing.net/answers/linux/stuck-in-console-mode/5140.html

Linux starting in shell mode?! www.computing.net/answers/linux/linux-starting-in-shell-mode/21007.html