Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jul 2006 08:39:49 -0700
From:      "Atom Powers" <atom.powers@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: shell scripting: help appreciated
Message-ID:  <df9ac37c0607030839v192c675eh2b1edb750d12cd43@mail.gmail.com>
In-Reply-To: <006701c69e7a$7898db00$01010101@avalon.lan>
References:  <006701c69e7a$7898db00$01010101@avalon.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
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";


-- 
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?df9ac37c0607030839v192c675eh2b1edb750d12cd43>