I have a question regarding expect, and i would like to know how to achieve this
Example scenario:
I have a command, Let's say test1, which when executed gives the below output
$./test1 --requestid 21 --file test1.xml
Myrequestid: 21
Profile: Test Profile
Filename: test1.xml
Action (update/validate):
When the test1 is executed with options --requestid 21 --file test1.xml, creates a file test1.xml with some data related to request id 21 and also presents an interactive menu asking user to either enter update/validate.
Now the user after executing the above command, opens another terminal Edits test1.xml
Note for editing/modifying the xmlfile, i have another script so i just need to call that script.
after editing(once the script that modifies xml file) has completed, It has to return to the terminal where the above command is executed and enter update /validate at the interactive prompt to update or validate the changes.
I would like to automate this task using expect, Could some one provide hints on how best i can achieve the above using expect,