Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting sub-menu options within script

Status
Not open for further replies.

blodwyn

IS-IT--Management
Mar 23, 2001
24
0
0
Hi

Our application includes a very useful monitoring utility, with a selection of sub-menus.

I should like to be able to take a snapshot of the output at times throughout the night, for further querying.

I can get the initial menu into a file easily enough, but the details I need are within a sub-menu of a sub-menu.

eg If I was running it interactively I would select "A" initially, which would give me another menu where I would select "C" to show the details I want.

Is there a way I can specify the required options within a script to capture the output from "C"?

Regards


Blodwyn
 
depends how your "application" is written.

you can try:

myApplication <<!EOF > outputC.txt
A
C
EOF


vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
sorry:

myApplication <<EOF > outputC.txt
A
C
EOF

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Have you tried something like this ?
echo "A\nC" | monitoring

You may also consider expect

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top