Skip to main content
added 783 characters in body
Source Link
Digital Trauma
  • 73k
  • 9
  • 112
  • 264

Bash, 15

  • 3-8 bytes saved thanks to @DPD-.
echo 
{Y..b..8}

#Pure BashThere is a CR character immediately preceding the {. This is probably not rendered meaningfully by the browser.

In real terms, 23this outputs "CRYSPACECRa". The CR (carriage return) moves the cursor back to the beginning of the line, and so the a overwrites the y.

r=({Y..b})
echo ${r[8]}

Try it online!

CreatesThis doesn't render correctly in TIO, so there is an additional pipe to col -b to make the cursor movements absolute.

To enter this array and displaysat the 8th memberterminal:

Y Z [  ] ^ _ ` a b
  • type echoSPACE
  • type CTRL-V CTRL-M
  • type {Y..b..8}

#Pure Bash, 23

r=({Y..b})
echo ${r[8]}

Creates this array and displays the 8th member:

Y Z [  ] ^ _ ` a b

Bash, 15

  • 3-8 bytes saved thanks to @DPD-.
echo 
{Y..b..8}

There is a CR character immediately preceding the {. This is probably not rendered meaningfully by the browser.

In real terms, this outputs "CRYSPACECRa". The CR (carriage return) moves the cursor back to the beginning of the line, and so the a overwrites the y.

Try it online!

This doesn't render correctly in TIO, so there is an additional pipe to col -b to make the cursor movements absolute.

To enter this at the terminal:

  • type echoSPACE
  • type CTRL-V CTRL-M
  • type {Y..b..8}
Source Link
Digital Trauma
  • 73k
  • 9
  • 112
  • 264

#Pure Bash, 23

r=({Y..b})
echo ${r[8]}

Creates this array and displays the 8th member:

Y Z [  ] ^ _ ` a b