Re: Need help in Expect Module

2011-02-03 Thread Zaheer Abbas
Thanks a lot Parag.. That was indeed helpful... On Thu, Jan 20, 2011 at 11:50 AM, Parag Kalra wrote: > Snippet of what I understand from your requirement: > > parag@ubuntu-studio:~$ cat app > #!/bin/bash > if [ $# -ne 1 ] > then >echo -e "Invalid number of input\nUsage: app " >exit 1 > e

Re: Need help in Expect Module

2011-01-19 Thread Parag Kalra
Snippet of what I understand from your requirement: parag@ubuntu-studio:~$ cat app #!/bin/bash if [ $# -ne 1 ] then echo -e "Invalid number of input\nUsage: app " exit 1 else input=$1 fi if [ $input != "register" ] then echo "Invalid choice" exit 1 fi echo "mac" echo "windoze

Need help in Expect Module

2011-01-19 Thread Zaheer
Hi, I am trying to automate a cli application that has multiline output. I want to be able to grep for this multi line output as single string using Expect module and send some keys as input. The cli would be something like bash-3.00# /opt/myapp/bin/app register 1) someservername(1) 2) someoptio