![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to verify that copied data to remote system is identical with local data. | ynilesh | Shell Programming and Scripting | 3 | 01-31-2008 05:55 AM |
| Howto capture data from rs232port andpull data into oracle database-9i automatically | boss | UNIX for Dummies Questions & Answers | 1 | 09-22-2007 11:35 PM |
| Using loop reading a file,retrieving data from data base. | Sonu4lov | Shell Programming and Scripting | 1 | 01-19-2007 12:38 AM |
| Submitting jobs remotely...Experts help reqd | arijit | UNIX for Advanced & Expert Users | 3 | 02-08-2006 10:02 PM |
| Unix Program for data and print | miketaylor | UNIX for Advanced & Expert Users | 5 | 05-21-2002 07:49 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
submitting data during a program run
I'm new to this and didn't know what my problem is called but here it is:
A program called "prepdata" is run which asks the user to enter in a <input> file for the data to be taken from. However, it won't accept that input filename as an argument: $ prepdata <input> will NOT work prepdata reads it from the user after prepdata is already running: $ prepdata Enter an input file: <input> $ I'd rather not attempt to edit the prepdata program for it to accept <input> as an argument. How can I get a script to "type" in the <input> filename when prepdata asks for it? It's like I need the script to send raw keyboard input after a certain amount of time but I have no idea how to do that. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Pipe the data as stdin
Code:
echo "<input>" | ./prepdata Code:
./prepdata <<EOF <input> EOF |
|
#3
|
|||
|
|||
|
Bah!
I looked at piping hours ago. Obviously I had it backwards. Sorry for the trivial question, and thanks for the quick response. |
|||
| Google The UNIX and Linux Forums |