Register
It is currently Wed Apr 23, 2014 11:27 pm

scripting for programs with their own CLI


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Tue May 11, 2010 2:38 pm   

Joined: Tue May 11, 2010 2:25 pm
Posts: 1
Sometimes the biggest problem is just asking the right question. I am trying to automate a setup in which part of the script must call a program (boo) that has its own CLI. I make several commands at the standard prompt but then call boo a program that gives me a new prompt. Rather than the script feeding lines to the new prompt the script hangs because it is waiting for boo to terminate but it won't until it gets a quit command.

What is this called? I don't think its a sub shell cause I'm not trying to runt things in parallel. It's still a linear set of commands its just that the shell prompt is replaced by boo's prompt until boo is quit.

If I knew what it was called I could do a better search.

TIA

Norm


Top
 Profile  
 PostPosted: Fri May 14, 2010 8:43 am   
User avatar

Joined: Tue Apr 27, 2010 2:28 pm
Posts: 172
Location: Czech Republic
If boo just reads commands from the standard input, you can feed some to it from your script:
Code:
boo << EOF
command1
command2
quit
EOF


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP