On Sat, Dec 4, 2010 at 8:02 AM, Ashish Verma <[email protected]> wrote:

> Hi,
>
> I need to pass answers to a program using bash script. How is it possible.
> I
> have surfed the net and was able to find the below solutions. However the
> problem I am facing is, after the program accepts the first answer, it
> doesn't accept the second for some unknown reason.
>
> *./command < answers.file*
>
> or
>
> *ans1| ./command* ------ works for only 1 answer as the space needs to be
> avoided.
>
> If I type ans1 ans2, It takes both as answer to the first question.
>
>
Hi,

What about "getopt" and "getopts"?
Both "getopt" and getopts are tools to use for processing and validating
shell script arguments.

Here is a C example I posted earlier :
http://www.mail-archive.com/[email protected]/msg15441.html


Thanks & Rg
Mohan L
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to