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 | |
Working Code
| [reply] [d/l] [select] |
by u65 (Chaplain) on Oct 09, 2015 at 12:11 UTC | |
It looks like you are using two log files. Does either show anything? | [reply] |
by u65 (Chaplain) on Oct 09, 2015 at 14:27 UTC | |
I've downloaded and am trying to execute the code. Can you please define ALL -Tom 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. | [reply] |
by ryalagikar (Novice) on Oct 12, 2015 at 05:59 UTC | |
Hi, 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). | [reply] [d/l] [select] |
by u65 (Chaplain) on Oct 12, 2015 at 12:27 UTC | |
by ryalagikar (Novice) on Mar 02, 2016 at 11:49 UTC | |
Hi, 'custom_error' subroutine does database update as 'failed' that's it.
| [reply] [d/l] |