Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie question

Status
Not open for further replies.

WileE

Technical User
Nov 16, 2001
3
0
0
US
I an writing a simple script that will start a program
but the first thing the program does is ask for a source database.

I am trying to figure out how to tell the script to wait till the program loads before it fills in the path to the database.

so far this is what i have:

'dxfout'
'/users/cx/*****/'

(where 'dxfout' is the program I am trying to run and "/users/cx/*****/' is the Input database I normally type in by hand.)

As I stated in the topic I am new to UNIX scripting and actually I am using HP-UX if it matters.

Thank you all in advance for any help you can give.
 
Provided your 'dxfout' program is reading his standard input for the answer needed, you can try something like this:
Code:
echo "/users/cx/*****/" | dxfout

Hope This Help
PH.
 
PH,

I tried your script but it just fills my screen with the "Input DB ?" line which is my prompt to type in the "/users/cx/*****/". It just fills and keeps on filling my screen till I break it and then it stops still waiting for the path to the database.

Not sure if that helps you or anyone else but that's what I'm getting.

Thank you for your help! I really appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top