A bash
script is using a variable Q
for some purpose (outside the scope of this question):
Q=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
As this script is used in an environment where each byte counts, this is waste. But some workaround like
Q=0$(seq -s "" 9)$(echo {A..Z}|tr -d " ")
(for C
locale) is even worse. Am I too blind to see the obvious trick to compactly generate such a simple sequence?
. a
to load it. Or even better, set it as an environment variable somewhere where it then becomes available to the script. – ilkkachu Sep 21 '21 at 11:06Q
was introduced later. sigh – Philippos Sep 21 '21 at 11:20{A..Z}
, I'm guessing it's one in which the letters are contiguous, but the question would be better if you made that explicit. – Toby Speight Sep 22 '21 at 06:50