Quoting [EMAIL PROTECTED]: > On Feb 12, 2007, at 10:21 AM, Tim Jones wrote: > > > > That's because you're running /bin/bash and then using writeline to > > send your command. What if you just execute the command directly > > with: > > [ connect shell statements with semicolons ] > > > I've not looked into the issue with the exec'd bash output (I > > believe it has something to do with the possibility that bash > > thinks it no longer has an attached TTY) since it can be resolved > > by executing the command directly. Also, if you exec a long-term > > interactive command such as "mail" directly, the output doesn't get > > mangled like that. > > Okay, so that works perfectly. There's just one problem - I need to > be able to get intermediate results in the middle of all those > statements, and modify the subsequent statements based on that. How > would I go about doing that?
By monitoring the output as part of the DataAvailable event. You can watch for specific output and then take the necessary action based on what you get back. For example, I use an if-then sequence to check what I get back from BRU while backups are running and split the data up for proper processing. Some lines are used to update the user feedback, while others trap tape change events and prompt the user of send the commands to the tape library. Tim -- Tim Jones [EMAIL PROTECTED] _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
