[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to make an alphabetical counter

From: David D
Subject: Re: how to make an alphabetical counter
Date: Sun, 23 Dec 2001 22:54:19 +0100

# 1-> a ... 26->z

# from 96 lower case

# from 65 upper case


eval "echo \$'\\$(printf %o "$[$number+65]")'"


eval "echo \$'\\$(printf %o "$[$number+96]")'"

# hum ...

echo uppercase("a")

Great it works !

For alphabetical in upper case, is there any fonction ,or I have to start
from 65 in hexa.

# hum .
I cas u do a simple loop, with a for statement like in c.


> "David D" <address@hidden> wrote:
> > Yes, I d like to make an alphabetical counter wich when I make ++ goes
> > a to b etc ...
> Use a numeric counter, and then to get the alphabetic character from
> the number, use:
> $ eval "echo \$'\\$(printf %o "$[$number+96]")'"
> paul

reply via email to

[Prev in Thread] Current Thread [Next in Thread]