Solved

Does anyone know how to put the <enter> key in Bourne Shell?

Posted on 2002-05-17
5
197 Views
Last Modified: 2010-04-21
I have a utility that need to hit the enter key to get updates.  I want to run this utility in a script then hit enter every 60 sec.  
0
Comment
Question by:vctsang
5 Comments
 
LVL 5

Expert Comment

by:ecw
ID: 7020280
while sleep 60 ; do echo ; done | script
0
 

Author Comment

by:vctsang
ID: 7021499
Thanks for the info.  The C utility I have for an application it will prompt you to hit ENTER from standard input from the terminal to run it.  I want to know if we can put the ENTER key in a script and run it every 60 secondes. Thanks,  -Vin
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 7022491
#! /usr/bin/expect
open "/path/to/application"
while {1==1} {
  send "\n"
  sleep 60
}
0
 
LVL 21

Expert Comment

by:tfewster
ID: 7921124
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by ahoffmann

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7967070
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question