Date: Tue, 4 Jul 2006 12:20:00 +0200 From: "no@spam@mgedv.net" <nospam@mgedv.net> To: "'Atom Powers'" <atom.powers@gmail.com> Cc: freebsd-questions@freebsd.org Subject: RE: shell scripting: help appreciated Message-ID: <003101c69f53$686306a0$01010101@avalon.lan> In-Reply-To: <df9ac37c0607030839v192c675eh2b1edb750d12cd43@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> -----Original Message----- > From: owner-freebsd-questions@freebsd.org > [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of Atom Powers > Sent: Monday, July 03, 2006 5:40 PM > Cc: freebsd-questions@freebsd.org > Subject: Re: shell scripting: help appreciated > > On 7/3/06, no@spam@mgedv.net <nospam@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003101c69f53$686306a0$01010101>