Results 1 to 3 of 3
i am trying to represent alphabet into a array, and then i can count the frequency
for example
array[a]=0
array[b]=0
but i find the index of the array seems to ...
- 07-09-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 16
bash arrays
i am trying to represent alphabet into a array, and then i can count the frequency
for example
array[a]=0
array[b]=0
but i find the index of the array seems to be
array[1]=0
array[2]=0
I was try this way get the ascii for them, actually I have done this in java and it is simple.
something like this format
array[ascii{a}-ascii{a}]=0
array[ascii{b}-ascii{a}]=0
I have done a lot of searching , but cannot get what I want.
'%d\n' "'$char" like this would not work.
- 07-09-2010 #2Just Joined!
- Join Date
- Jun 2010
- Posts
- 16
for i in {a..z}
do
alphabet[$i]=0
done
actually I try to do this at the beginning.
- 07-10-2010 #3Just Joined!
- Join Date
- Jun 2010
- Posts
- 16
Up up up
go HOLLAND


Reply With Quote