Answer the question
In order to leave comments, you need to log in
How to substitute a variable in {}?
For example
~ $ x=$(seq -f %03g -s, 0 2);echo $x;
000,001,002
How to substitute $x into the echo {A..F}-{ $x } command so that it works like
~ $ echo {A..C}-{000,001,002}
A-000 A-001 A-002 B-000 B-001 B-002 C-000 C-001 C-002
Answer the question
In order to leave comments, you need to log in
x=$(echo {A..C}-{000..002})
# A-000 A-001 A-002 B-000 B-001 B-002 C-000 C-001 C-002
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question