Brett Parker iDunno@sommitrealweird.co.uk wrote:
No, you can not do: cp dcp_`seq 1156 1183`.jpg dest And here's why... the arguments to cp will expand to: dcp_1156 1157 ... 1183.jpg
Actually, if you use the rc shell, you can do exactly that: cp dcp_^`{seq 1156 1183}^.jpg dest The `{} expands to a list, which then has the endings added associatively to produce dcp_1156.jpg dcp_1157.jpg and so on.
Unfortunately, bash just turns the output of backticks into a string and pastes it into the command. It then reads the next command in from that, which causes problems in this and other situations, instead of doing what you usually want.