shell scripting: help appreciated
no at spam at mgedv.net
nospam at mgedv.net
Tue Jul 4 10:19:58 UTC 2006
> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org
> [mailto:owner-freebsd-questions at freebsd.org] On Behalf Of Atom Powers
> Sent: Monday, July 03, 2006 5:40 PM
> Cc: freebsd-questions at freebsd.org
> Subject: Re: shell scripting: help appreciated
>
> On 7/3/06, no at spam@mgedv.net <nospam at mgedv.net> wrote:
>
> >
> > if i change the line
> > /bin/sh -c subprogram.sh $h_val1 $h_val2 $h_opt1;
> > to
> > echo /bin/sh -c subprogram.sh $h_val1 $h_val2 $h_opt1;
> > the program loops for all records in the foo.conf correctly.
> >
> > if i remove the "echo" keyword, the sub-script get's executed,
> > but the shell terminates as if there were lesser records in
> > the foo.conf file!
>
>
> try:
>
> eval /bin/sh -c "subprogram.sh $h_val1 $h_val2 $h_opt1";
>
>
well, even changing to "/bin/sh -c subprogram.sh" without passing
any parameters (everything is taken now from the environment, the
program still stops after reading lesser records from the input
file as there are :-(
the shell returnvalue is being checked after the subprogram returns
and i get all the messages after the subprogram inside the loop, too.
so it's not an error-exit or something like that. it's just as if there
were lesser records for the input to the loop.
More information about the freebsd-questions
mailing list