I want to do this in a bash shell:
n=7
cp ~/file_{1..$n}.dat .
What I want it to execute is cp ~/file_{1..7}.dat .
, but I know this isn't the proper way to do it. Can someone give me the correct format (without having to use a loop)?
I want to do this in a bash shell:
n=7
cp ~/file_{1..$n}.dat .
What I want it to execute is cp ~/file_{1..7}.dat .
, but I know this isn't the proper way to do it. Can someone give me the correct format (without having to use a loop)?