Brace expansion with variables and arrays: eval to the rescue
In a 2019 blog post I tinkered with two alternatives to BASH brace expansion. Alternatives might be needed because strings with spaces cause problems unless separately quoted, and (I thought) you can't put shell variables inside the braces because BASH does brace expansion first when executing a command. But with the help of eval, a BASH built-in, you can brace-expand variables with ease, and a simple conversion lets you brace-expand BASH arrays.
|
|
Full Story |
This topic does not have any threads posted yet!
You cannot post until you login.