@pixx @egallager we golfin'
-
@pixx @egallager we golfin'?
seq 26 |xargs -I{} sh -c 'printf "\x$(printf %x $(({} + 96)))\n"'
-
@pixx @egallager we golfin'?
seq 26 |xargs -I{} sh -c 'printf "\x$(printf %x $(({} + 96)))\n"'
@pixx @egallager oh, wait, we can awk to save a few more chars. This is almost not terrible, and it does not require bash. It works in every shell I tested (csh and dash, which is a minimalist mostly POSIX shell, in addition to bash), while the nice `echo {a..z}` only works in bash.
seq 26 | awk '{ printf "%c\n", $1 + 96 }'
-
@pixx @egallager oh, wait, we can awk to save a few more chars. This is almost not terrible, and it does not require bash. It works in every shell I tested (csh and dash, which is a minimalist mostly POSIX shell, in addition to bash), while the nice `echo {a..z}` only works in bash.
seq 26 | awk '{ printf "%c\n", $1 + 96 }'
yea, that's better. Realized bash printf was garbage, forgot awk's is good
-
yea, that's better. Realized bash printf was garbage, forgot awk's is good
@pixx @egallager yeah, I was cussing about bash printf the whole time. But, I cuss about it all the time because you can't pipe to it without xargs, as well.