Assume an simple keyboard with this layout:
1 2 3 4 5 6 7 8 9 0
A B C D E F G H I J
K L M N O P Q R S T
U V W X Y Z . , ? !
Peter's keyboard pattern can be generated by starting at the top left of the keyboard, and displays the first three characters and a newline. It shifts over one character and displays the second, third, and fourth key. Once it reaches the end of a row it continues at the end of the next row and goes backwards, until it reaches the start of that row and then goes forward on the next row, and so on until it reaches the beginning of the last row.
This is Peter's keyboard pattern:
123
234
345
456
567
678
789
890
90J
0JI
JIH
IHG
HGF
GFE
FED
EDC
DCB
CBA
BAK
AKL
KLM
LMN
MNO
NOP
OPQ
PQR
QRS
RST
ST!
T!?
!?,
?,.
,.Z
.ZY
ZYX
YXW
XWV
WVU
Write a program which accepts no input and displays Peter's keyboard pattern. The program must be smaller than 152 bytes, i.e. the size of the string it outputs.
This is code golf, so the shortest solution wins.
[1..9 0 J..A K..T ! ? , . Z..U]
. \$\endgroup\$echo {1..9} "0" {J..A} {K..T} '!?,.' {Z..U}|sed 's/ //g'
in bash, but need already 13 chars to append a sed-command, to remove blanks. This makes 57 chars, and no triple has been build so far. With sed's hold-command, it should be possible, but in 6 chars, to beat the perl-solution? \$\endgroup\$