First, the variable blstr is not assigned the desired result unless you use "command substitution", i.e. $(seq ... ) . Then, why do you use the hsgen variable at all instead of issuing the command itself? Third, $hsgen will execute by itself except for the redirection; if you want that, use eval $hsgen .
Some systems (such as Solaris 10 and 11) have neither jot nor seq utilities. If you want to stay in awk rather than use jot, perl, or seq the following will work:
#!/bin/ksh
printf "%s\n" "1-3,6,7,9-11" "101-105,1000,10010-10013" | awk -F, '{
no = 0 # number of values output for this input line
# Loop through comma separated input fields.
for(i = 1; i <= NF; i++) {
n = split($i, range, "-")
# Loop through the dash separated range.
# Note that if there is no dash in $i, range[1] == range[n].
for(j=range[1]; j<=range[n]; printf("%s%d", no++ ? " " : "", j++));
}
printf("\n")
}'
With the two lines of input I gave it, it produces the following output: