The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to execute java program from perl umen Shell Programming and Scripting 1 08-10-2008 03:08 AM
how to execute this program? sathyaac Shell Programming and Scripting 1 06-27-2008 07:31 AM
send mail in sh program whatisthis UNIX for Dummies Questions & Answers 1 04-13-2006 01:20 PM
execve to execute a program winsonlee High Level Programming 0 07-25-2004 04:18 AM
Urgent!! How to write a shell program to execute command to access internet? firebirdonfire UNIX for Dummies Questions & Answers 2 04-26-2001 11:16 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-19-2008
tuathan tuathan is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 10
Script to open program and send/execute command in program

Hi,

i want to write a script that executes a program (exec?) .
this program then requires a filename as input.
how do i give it this input in the script so the program will be complete run and close by the script.

e.g.

exec prog.exe

program then asks for filename

"enter filename:"
(want to get filename from script)

press enter

then exits program

back to script


Thanks!
  #2 (permalink)  
Old 11-19-2008
tuathan tuathan is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 10
touch tempscript
TMPST=tempscript
echo "/well2xmgr4.exe <<+" >> $TMPST
echo $IP >> $TMPST
echo + >> $TMPST
echo exit >> $TMPST

this worked for what i want to do.
Sponsored Links
Closed Thread

Bookmarks

Tags
script exec i/o

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:13 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0