Code:
$ ./s3
Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 3.16.0-4-amd64, x86_64
Distribution : Debian 8.4 (jessie)
bash GNU bash 4.3.30
-----
Example 1, brace expansion, constants:
2,3,4,
-----
Example 2, variables (bash fails; ksh succeeds):
3,4,5,
-----
Example 3, variables, but with eval:
3,4,5,
-----
Example 4, hex values in variables, remove final comma:
a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,aa,ab,ac,ad,ae,af,b0
-----
Example 5, hex values in variables, arithmetic to eliminate comma:
a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,aa,ab,ac,ad,ae,af,b0
-----
Example 6, read from file, create sequence:
Data:
lo = 4D40, hi = 4D42
4d40,4d41,4d42