[NTLUG:Discuss] expect or what

Fred James fredjame at fredjame.cnc.net
Fri Sep 19 12:07:42 CDT 2008


All
(this is only slightly off topic - it is all *nix, if not all linux)
I have been embedding 'expect' scripts (embedded in sh/BASH) to do 
interactive things like ftp - great thing is that I can also get a log 
of the process
       expect << EOF >> $LogFile
             (some code)
       EOF
As you can see, there are really 2 parts to this:  (a) get an 
interactive job done non-interactively, and (b) log the process (3 
actually, as I search the log info for exception/errors, and act upon 
any found)

Now the issue - I am getting some resistance to 'expect' (i.e., it isn't 
on a system and I get raised eyebrows about wanting it there)

So, I am taking a step back for a moment to ask, am I am being silly?  
Is there another, perhaps better or at least not worse, way to 
accomplish the requirements?

Thank you in advance for any help you may be able to offer
Regards
Fred James

PS:  Please don't say Perl!  'expect' in shell is so much simpler.




More information about the Discuss mailing list