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
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
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