I want to use brace expansion to generate the following argument sequence: ./some_command -c root.foo -c root.bar -c root.baz. Brace expansion at first glance looks as a perfect tool: use -c root. as a preamble and {foo,bar,baz} inside braces. However, preamble cannot contain field separators:
./some_command -c root.{foo,bar,baz}expands to-c root.foo root.bar root.baz(obviously)./some_command -c\ root.{foo,bar,baz}expands to-c\ root.foo -c\ root.bar -c\ root.baz(obviously again). Here I get three arguments instead of six desired.
Is it possible to make a preamble with an argument separator?
-c whateverand-cwhateverequivalently. If./some_commandis one of them, then use./some_command -croot.{foo,bar,baz}. – Kamil Maciorowski Feb 19 '24 at 10:10[ -c option_argument]in the example), a conforming application shall use separate arguments for that option and its option-argument. However, a conforming implementation shall also permit applications to specify the option and option-argument in the same argument string without intervening