Hi all,
I couldn't find an answer for this easy question, probably because the keywords I used in the search are too generic.
I just want to make a list of numbers using the value of a variable, like this:
NumFiles=$(ls | wc -l)
for i in {1..$NumFiles}; do
[...]
Say $NumFiles = 5. Bash reads that as the string "{1..5}", but it won't generate the sequence of numbers I want.
How can I do this?
Thanks