From owner-freebsd-questions@FreeBSD.ORG Tue Jul 4 10:19:58 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 392DC16A4DD for ; Tue, 4 Jul 2006 10:19:58 +0000 (UTC) (envelope-from nospam@mgedv.net) Received: from mail.mgedv.net (mail.mgedv.net [81.223.168.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8DA343D45 for ; Tue, 4 Jul 2006 10:19:56 +0000 (GMT) (envelope-from nospam@mgedv.net) Received: from metis (sslint.my.loop [1.1.1.1]) by mail.my.loop (mgedv) with ESMTP id 6D5BA457A7; Tue, 4 Jul 2006 12:19:55 +0200 (CEST) From: "no@spam@mgedv.net" To: "'Atom Powers'" Date: Tue, 4 Jul 2006 12:20:00 +0200 Message-ID: <003101c69f53$686306a0$01010101@avalon.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: thread-index: AcaetvlGL/UNjg0FTFKHMtqW+OKaHwAnBLgg Cc: freebsd-questions@freebsd.org Subject: RE: shell scripting: help appreciated X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2006 10:19:58 -0000 > -----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 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.