Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Sep 2005 17:56:28 -0500
From:      Paul Schmehl <pauls@utdallas.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: Shell scripting question
Message-ID:  <1C2753F79CB89D4C9BF30439@utd59514.utdallas.edu>
In-Reply-To: <35c231bf05091213172be30212@mail.gmail.com>
References:  <01A14A33D6971135F96609A2@utd59514.utdallas.edu> <35c231bf05091213172be30212@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--On Monday, September 12, 2005 13:17:05 -0700 David Kirchner <dpk@dpk.net> 
wrote:

> On 9/12/05, Paul Schmehl <pauls@utdallas.edu> 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/



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