From owner-freebsd-questions@FreeBSD.ORG Mon Sep 12 22:56:29 2005 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 BCA5516A420 for ; Mon, 12 Sep 2005 22:56:29 +0000 (GMT) (envelope-from pauls@utdallas.edu) Received: from smtp1.utdallas.edu (smtp1.utdallas.edu [129.110.10.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4629843D48 for ; Mon, 12 Sep 2005 22:56:29 +0000 (GMT) (envelope-from pauls@utdallas.edu) Received: from utd59514.utdallas.edu (utd59514.utdallas.edu [129.110.3.28]) by smtp1.utdallas.edu (Postfix) with ESMTP id A27F1388F83 for ; Mon, 12 Sep 2005 17:56:28 -0500 (CDT) Date: Mon, 12 Sep 2005 17:56:28 -0500 From: Paul Schmehl To: freebsd-questions@freebsd.org Message-ID: <1C2753F79CB89D4C9BF30439@utd59514.utdallas.edu> In-Reply-To: <35c231bf05091213172be30212@mail.gmail.com> References: <01A14A33D6971135F96609A2@utd59514.utdallas.edu> <35c231bf05091213172be30212@mail.gmail.com> X-Mailer: Mulberry/3.1.6 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: Shell scripting question 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: Mon, 12 Sep 2005 22:56:30 -0000 --On Monday, September 12, 2005 13:17:05 -0700 David Kirchner wrote: > On 9/12/05, Paul Schmehl wrote: >> How can I strip the leading character from the string so that I can test >> to see if it's zero? > > This'll strip the 0, while leaving other numbers intact: > > $ X=09 > $ echo ${X#0} > 9 Thanks, David. That's exactly what I needed, and now that you've pointed it out to me, I see (reading the specs) how that is it. I just didn't understand what I was reading before you pointed it out. Paul Schmehl (pauls@utdallas.edu) Adjunct Information Security Officer University of Texas at Dallas AVIEN Founding Member http://www.utdallas.edu/ir/security/