Skip to main content
deleted 22 characters in body
Source Link
John B
  • 109
  • 1

Bash, 64

d=(z one two three four five six seven eight nine)
echo ${d[$1]}

This is a script that acceptsTakes the first argument as thea number and uses it as an array index to print it'sthe corresponding word.

Bash, 64

d=(z one two three four five six seven eight nine)
echo ${d[$1]}

This is a script that accepts the first argument as the number and uses it as an array index to print it's corresponding word.

Bash, 64

d=(z one two three four five six seven eight nine)
echo ${d[$1]}

Takes the first argument as a number and uses it as an array index to print the corresponding word.

Source Link
John B
  • 109
  • 1

Bash, 64

d=(z one two three four five six seven eight nine)
echo ${d[$1]}

This is a script that accepts the first argument as the number and uses it as an array index to print it's corresponding word.