fork(4) download
  1. #!/bin/bash
  3. f(){
  4. # The following 2 lines of this function body may exist as a standalone script:
  5. a=(_ {A..I} {1..26} {J..Z} {A..Z})
  6. echo ${a[36#$1]}
  7. }
  9. for test in {1..26} {A..Z}; do
  10. echo input=$test, output=$(f $test)
  11. done
Success #stdin #stdout 0.01s 5104KB
Standard input is empty
input=1, output=A
input=2, output=B
input=3, output=C
input=4, output=D
input=5, output=E
input=6, output=F
input=7, output=G
input=8, output=H
input=9, output=I
input=10, output=J
input=11, output=K
input=12, output=L
input=13, output=M
input=14, output=N
input=15, output=O
input=16, output=P
input=17, output=Q
input=18, output=R
input=19, output=S
input=20, output=T
input=21, output=U
input=22, output=V
input=23, output=W
input=24, output=X
input=25, output=Y
input=26, output=Z
input=A, output=1
input=B, output=2
input=C, output=3
input=D, output=4
input=E, output=5
input=F, output=6
input=G, output=7
input=H, output=8
input=I, output=9
input=J, output=10
input=K, output=11
input=L, output=12
input=M, output=13
input=N, output=14
input=O, output=15
input=P, output=16
input=Q, output=17
input=R, output=18
input=S, output=19
input=T, output=20
input=U, output=21
input=V, output=22
input=W, output=23
input=X, output=24
input=Y, output=25
input=Z, output=26