Skip to main content
added 266 characters in body
Source Link

I looked through some of the posted threads and none of them cover my query.

I have a simple line of code below which prints all the ASCII characters:

echo {' '..'~'} 

I want to be able to use a variable to substitute this array like below

list="{' '..'~'}" 

and then do the following

echo $(print ${list}) 

To clarify what I am trying to do:

passwordLength="2" for (( i = 0; i < $passwordLength; i++ )) do # concatenate random characters samplePasswordRegex="$samplePasswordRegex{' '..'~'}" done echo $^samplePasswordRegex 

I looked through some of the posted threads and none of them cover my query.

I have a simple line of code below which prints all the ASCII characters:

echo {' '..'~'} 

I want to be able to use a variable to substitute this array like below

list="{' '..'~'}" 

and then do the following

echo $(print ${list}) 

I looked through some of the posted threads and none of them cover my query.

I have a simple line of code below which prints all the ASCII characters:

echo {' '..'~'} 

I want to be able to use a variable to substitute this array like below

list="{' '..'~'}" 

and then do the following

echo $(print ${list}) 

To clarify what I am trying to do:

passwordLength="2" for (( i = 0; i < $passwordLength; i++ )) do # concatenate random characters samplePasswordRegex="$samplePasswordRegex{' '..'~'}" done echo $^samplePasswordRegex 
Became Hot Network Question
Source Link

Zsh Expanding Variables into Arrays or Lists

I looked through some of the posted threads and none of them cover my query.

I have a simple line of code below which prints all the ASCII characters:

echo {' '..'~'} 

I want to be able to use a variable to substitute this array like below

list="{' '..'~'}" 

and then do the following

echo $(print ${list})