4

我需要打印这样的东西:

a
b
c
.
.
.
z
A
B
C
.
.
.
Z
0
1
2
.
.
.
9

这可以单独完成,但是。

 for f in {a..z}; 
   do        
   echo $f;   
done
 for f in {A..Z}; 
   do        
   echo $f;   
done

 for f in {0..9}; 
   do        
   echo $f;   
done

但我怎样才能做到这一点呢?也许是这样的?但不工作。

 for f in {a..z:A..Z:1..9}; 
   do        
   echo $f;   
done
4

2 回答 2

9
for f in {a..z} {A..Z} {0..9}; do
    echo "$f"
done
于 2012-11-26T19:20:48.650 回答
3

或者,如果您只想打印它们:

printf "%s\n" {0..9} {A..Z} {a..z}
于 2012-11-26T19:24:09.273 回答