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

next in thread | previous in thread | raw e-mail | index | archive | help
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=3D09
$ echo ${X#0}
9



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