I was wondering whether expansion of {} in bash shell, e.g. of command /path/to/file{1,2,3} works horizontally, i.e. command /path/to/file1 /path/to/file2 /path/to/file3or vertically, i.e. command /path/to/file1command /path/to/file2command /path/to/file3It works horizontally. Is there a way to achieve vertical expansion as described here without using loops, i.e. in an equally easy way, like specifying the equivalent of {}?
Is there a way to express fixed size loops as loop-less expansion statement in bash?
bash;brace expansion
You can echo the result and pipe it to xargs -n1:echo /path/to/file{1,2,3} | xargs -n1 command