OK, I'm going to think out loud.  Please let me know
if I am off track.

In my bash script, I will need to initiate a
connection to my old (AIX) server.  We're on a VPN, so
are using telnet.

#begin script
telnet xx.xx.xx.xx
echo "goodbyte"
#end script

The above script will not show "goodbye" until after
the connection to the server is closed.  This won't
help.  So I need to somehow control the input and
output of the telnet program.  Sounds like redirection
is needed.

#begin script
telnet xx.xx.xx.xx > SomeScript < SomeScript
echo "goodbyte"
#end script

The above should launch telnet as well as SomeScript,
and put all output to SomeScript, and get all input
from the same.

But my question is, will this direct IO to a process,
or will it overwrite SomeScript as a simple text file?

Kevin


--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:

> Hello all,
> 
> I need to do some terminal scripting.  As I try to
> download old progress notes from my server, it keeps
> stopping and asking me a pointless question (1000's
> of
> times!).  I need a simple terminal script that
> enters
> "N".
> 
> I know that TeraTerm Pro will do scripting, but I
> can't get it to properly emulate an 3151 terminal
> that
> our server expects.  The bash shell, however, does
> fine: all the functions keys work as needed etc.
> 
> So I know that there is a scripting language built
> into bash.  Is there any easy to write a program
> that
> simply scans for a given phrase (i.e. "Is this the
> same patient?") and then automatically enter "N". 
> And
> if not found, then stay out of the way?
> 
> Thanks
> Kevin
> 
> 
> 
>               
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We
> finish.
> http://promotions.yahoo.com/new_mail 
> 
> 
>
-------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for
> FREE
> LinuxWorld Reader's Choice Award Winner for best
> database on Linux.
>
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Hardhats-members mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/hardhats-members
> 



                
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Hardhats-members mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to