Re: Convert 08 to decimal 8
- From: SiKing <nospam@xxxxxxxxxxxxx>
- Date: Fri, 07 Sep 2007 16:03:21 +0100
Stephane CHAZELAS wrote:
2007-09-07, 15:35(+01), SiKing:
[...]
Hmmm, I am going to have to use "s/^0*//", because I have leading zeros (zeroes?) - plural.[...]
That will turn 0 or 000 into the empty string.
Right, I just figured that out too. :(
But can bash not do this on its own?[...]
bash, non standard:
What does that mean?
a=$((10#$a))
So that(!) is the secret syntax...
standard:
case a in (0*[!0]*) a=${a#${a%%[!0]*}};; esac
Whoa! That took me like 10 minutes to parse in my head.
Thank You!
.
- Follow-Ups:
- Re: Convert 08 to decimal 8
- From: Stephane CHAZELAS
- Re: Convert 08 to decimal 8
- References:
- Convert 08 to decimal 8
- From: SiKing
- Re: Convert 08 to decimal 8
- From: Miles
- Re: Convert 08 to decimal 8
- From: SiKing
- Re: Convert 08 to decimal 8
- From: Stephane CHAZELAS
- Convert 08 to decimal 8
- Prev by Date: Re: combining files
- Next by Date: Re: remsh a function in the current script
- Previous by thread: Re: Convert 08 to decimal 8
- Next by thread: Re: Convert 08 to decimal 8
- Index(es):
Relevant Pages
|