in reply to Redirect expect screen output to file
Can you show a working script in code blocks? Also it would help to put the output in separate code blocks. See Writeup Formatting Tips.
|Replies are listed 'Best First'.|
Re^2: Redirect expect screen output to file
by ryalagikar (Novice) on Oct 09, 2015 at 07:02 UTC
It looks like you are using two log files. Does either show anything?
I've downloaded and am trying to execute the code. Can you please define ALL
Update: Please also include your "custom_error" subroutine.
Update2: I'm making a bit of progress, but I believe it would help more if you could describe plainly what you are trying to accomplish with your script. Using Expect is a last resort IMHO--to be used ONLY when human interaction is needed. There may be a better way to handle your problem. For one thing you might check out auditd.
What i am trying to achieve using expect is, i have to fetch linux command(command may be simple linux command or shell script or perl script etc..) from database and execute the command based on the results have to perform some operations.
code as below
need below output into a file
I can redirect this output to file by running the script in back-end(&) mode. Is there any other way i can achieve this(any expect settings).
'custom_error' subroutine does database update as 'failed' that's it.