Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-13-2008, 11:11 PM   #1
Registered: Oct 2008
Posts: 31

Rep: Reputation: 15
shell script commands

I want to run a program (c program) and then give the user input automatically

/shell script command/

(after compiling this statement i need to give few inputs) how can I add my input with this command(I have 10 inputs every one should wait for 10 sec.)
Old 10-14-2008, 02:09 AM   #2
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
I think you can use something called "expect". Haven't used ut myself, though.
Old 10-17-2008, 04:50 AM   #3
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
Old 10-20-2008, 01:47 PM   #4
Registered: Jun 2005
Location: U.S.
Distribution: xubuntu 8.10, linux 2.6.27-11-generic
Posts: 78

Rep: Reputation: 16
I think you're looking for pipes.


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
commands in shell script ? wolfindark Linux - Newbie 5 07-07-2008 04:29 AM
help with shell script commands Andrew0 Linux - Newbie 1 04-15-2006 12:55 PM
Alias or shell script to confirm 'exit' commands from a shell rose_bud4201 Programming 2 03-08-2006 02:34 PM
Shell Script Commands shandy^^^ Programming 16 02-09-2006 10:16 AM
Commands/Shell script ?? paraiso Linux - Newbie 11 04-21-2005 10:58 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:00 AM.

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