From owner-freebsd-rc@FreeBSD.ORG Wed Aug 29 22:33:18 2012 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 664) id 6949C1065759; Wed, 29 Aug 2012 22:33:18 +0000 (UTC) Date: Wed, 29 Aug 2012 22:33:18 +0000 From: David O'Brien To: Steve Wills Message-ID: <20120829223318.GA32596@hub.freebsd.org> References: <503E6D62.3000101@FreeBSD.org> <503E6FF8.60706@FreeBSD.org> <503E742D.3030801@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <503E742D.3030801@FreeBSD.org> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 7.4-STABLE Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Cc: ruby@FreeBSD.org, freebsd-rc@FreeBSD.org Subject: Re: procname when ruby is used X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 22:33:18 -0000 On Wed, Aug 29, 2012 at 03:57:33PM -0400, Steve Wills wrote: > name="mcollectived" > command="%%PREFIX%%/sbin/${name}" > read procname <"${command}" > procname="%%PREFIX%%/bin/${procname##*/}" Wouldn't this work? name="mcollectived" command="%%PREFIX%%/sbin/${name}" procname="%%PREFIX%%/bin/${command##*/}" (For example, "${0##*/}" is basename of a shell script's full path name) -- -- David (obrien@FreeBSD.org)