interacting with prompt
hi
I have a program which basically opens a new prompt, say like gnuplot would. now I want to be able to send commands to that prompt and retrieve the output and write it to a file. anyone a suggestion on how to do that? quarry 06 |
like this
ping google.com --> googleping.txt |
Re: interacting with prompt
Quote:
expect for interaction. Cheers, Tink |
Re: Re: interacting with prompt
Quote:
I guess I haven't explained very well. I call gnuplot from a shell script. then I want to type into the gnuplot prompt, but from withing my shell script. thanks |
Re: Re: Re: interacting with prompt
Quote:
It allows you to script interactive sessions. Cheers, Tink P.S.: Could you please a) shorten your sig and b) stick with English? Thanks. |
i still don't understand your expect, but I found what I was looking for.
It is called a "here" function and goes like this gnuplot <<** do whatever you want to do ** can you still explain what your explain does/how it works? and hey, I would love it if other users had sigs in other languages, so I could learn something new ! anyway thanks |
Quote:
going to be fine for one-of activities. If you for example have something that will ask something, expect input, do some more, then ask something new expect is the tool for you. ... Quote:
much to ask of mods to learn all possible lingos on the boards to make sure the contents is OK ;} Cheers, Tink |
no seirously!
open your home folder open a terminal and cd to your home folder type Code:
ping google.com --> googleping.txt |
Quote:
The following links can be of use... http://expect.nist.gov/ http://www.oreilly.com/catalog/expect/chapter/ch03.html |
All times are GMT -5. The time now is 09:55 PM. |