I know how to print all letters
{a..z} and {A..Z} and {0..9}
But is there a way to print all possible ASCII Characters via a bash loop?
I know how to print all letters
{a..z} and {A..Z} and {0..9}
But is there a way to print all possible ASCII Characters via a bash loop?
If it is okay to use awk
:
awk 'BEGIN{for (i=32;i<127;i++) printf("%c", i)}'
Or using printf
:
for((i=32;i<127;i++)) do printf "\x$(printf %x $i)"; done
You don't need a loop
echo -e \\x{0..7}{{0..9},{A..F}}
It prints all chars from 0 to 127.
use this:
for ((i=32;i<127;i++)) do printf "\\$(printf %03o "$i")"; done;printf "\n"