![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to launch a Csh shell script using Excel Macro ? | Raynon | Shell Programming and Scripting | 1 | 11-08-2006 12:22 PM |
| Regarding #ident macro | sarwan | High Level Programming | 1 | 10-06-2006 04:17 AM |
| macro | bankpro | High Level Programming | 9 | 02-01-2006 12:52 PM |
| USRSTACK macro | jalburger | HP-UX | 1 | 12-03-2004 04:58 PM |
| VI Macro Problem | Atama | UNIX for Dummies Questions & Answers | 1 | 05-16-2002 12:13 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
macro on shell script ?
in shifts we used to run a script where in we need to choose from different options. for example the first part would go like this:
======== menu ======== 1)blah 2)blah blah 3)blah blah blah you have chosen: then after that a series of multiple choice so on and so forth...what i would like to do is every time i run that script another script/macro will answer those multiple choice for me. is that possible? help me on this. |
|
||||
|
follow up question...
thanks for the reply PxT. i've that in the office and it worked just fine. but there is one more problem to it. as i have just said before that these scripts are series of multiple questions... it came to a point where there are no choices to make instead i have to press ENTER to choose default where is not included in the multiple choice. how can i put a "carriage return" in the macro? to illustrate:
========== menu ========== 1)blah 2)blah blah 3)blah blah blah you have chosen (ENTER=default blah): thanks for the help but i still need this very much. |
|
||||
|
sorry for the delayed reply... but
hey, i tried your suggestion and it worked fine... it just does not apply for scripts with loops. coz you said that if the selection requires only a carriage return just leave a blank or use ^M or ^V. well the blank thing work it just that if the script that you are trying to run the macro will loop at the end the output will be that it will endlessly try to throw in the carriage return as a result of an endless loop.
to illustrate the script constains the following loop: until "$quit" = "y" do (menu1) (menu2) (menu3) ... done see my problem? after issuing all the command at the end it will see only carriage return. i only solution i could think of is to quit the application and try to run the script again. anyway, thank you very very much for the reply. i learned a lot from this site. i hope to seek more answers from all of you ![]() |
| Sponsored Links | ||
|
|