I was generating random characters for some purpose. By mistake I try the following in a terminal and got some surprising result. I am using bash
shell provided by Ubuntu.
$ echo {Z..a}
Z [ ] ^ _ ` a
Inspiring by this result, I did
$ echo {z..A}
z y x w v u t s r q p o n m l k j i h g f e d c b a ` _ ^ ] [ Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
My question is what are these five characters [ ] ^ _ `
doing in the range. Do they have any special meaning or I am just performing some forbidden action.
People usually use $ echo {{A..Z},{a..z}}
in order to get both lower as well as the upper case characters,
Take a look at ascii table. After uppercase Z there are exactly those characters that you got, so there's no surprise - bash read ascii table from where you told it to, to where you told it to.
\
does not show up, though, because it is usually used for escape sequences like\n
- a newline