From owner-freebsd-questions@FreeBSD.ORG Wed Jan 12 15:35:13 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 864D1106564A for ; Wed, 12 Jan 2011 15:35:13 +0000 (UTC) (envelope-from faust64@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 32EDF8FC17 for ; Wed, 12 Jan 2011 15:35:12 +0000 (UTC) Received: by vws9 with SMTP id 9so165848vws.13 for ; Wed, 12 Jan 2011 07:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=z55vQlfFI9RfMxsa1j2cAKNqcbegKs6A2pi9gKUEL+4=; b=hEkaSLOEHZAMn87SBSypzc7UvJSVZe3MKZHOXsePoycfRnmTZd7mq4OgQGckwnddwr xGkzN1R3B1B54gWbkfuC+vX2gSG19MQOvDkLOPSaOOcBR9fcxQEJtJBPnpVjANXlUCPf NiDFWQ83vWsxRbjP2A9hUYl2nolb7nT/vlHnI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=Cb22HfAR6R7HOBDwOe7PqZzj83n+llxVy4I3rdMlErP0/8yMNVGRBkyoXfK0U9RYqm /LkWQzDP62yMaUgTr/NOEqURVFT/3qFikJb7YdvHKQCtMANrKrXKTxtaFQt6oA/NJqzD b5QLzB94M6gA+Ir8iHhVWTFkTAWdbZJpcDLxM= Received: by 10.229.235.2 with SMTP id ke2mr923651qcb.285.1294846512249; Wed, 12 Jan 2011 07:35:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.77.215 with HTTP; Wed, 12 Jan 2011 07:34:32 -0800 (PST) In-Reply-To: References: <4D2DB449.6070901@esiee.fr> From: =?ISO-8859-1?Q?Samuel_Mart=EDn_Moro?= Date: Wed, 12 Jan 2011 16:34:32 +0100 Message-ID: To: Chad Kellerman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Frank Bonnet , freebsd-questions@freebsd.org Subject: Re: problem with shell script 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: Wed, 12 Jan 2011 15:35:13 -0000 On Wed, Jan 12, 2011 at 3:50 PM, Chad Kellerman wrote: > On Wed, Jan 12, 2011 at 9:01 AM, Frank Bonnet wrote: > > > Hello > > > > I'm in trouble with a simple shell script that give > > erroneous value when running ... > > > > If I run commands interactively everything runs well > > > > > ps ax | grep slapd | grep -v grep | wc -l > > 1 > > > > If I run in the following shell script : > > > > #!/bin/sh > > SD=3D0 > > SD=3D`ps -ax | grep slapd | grep -v grep | wc -l` > > echo $SD > > > > the result is 3 !!! > > > ps ax | grep "[/]slapd " | wc -l may not fix the problem but still cleaner > > > > Any info welcome ! > > > > What's the name of your script? Hope it's not slapd_check.sh that will > cause and extra count in the ps, cus it will count itself. > > > Chad > > > > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to " > > freebsd-questions-unsubscribe@freebsd.org" > > > > > > -- > A grasshopper walks into a bar and the bartender says "Hey, we have a dri= nk > named after you." And the grasshopper says "Really, You have a drink name= d > Murray?" > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > --=20 Samuel Mart=EDn Moro {EPITECH.} 2011 CamTrace S.A.S "Nobody wants to say how this works. Maybe nobody knows ..." Xorg.conf(5)