Copying numerical range of folders

Lorenzo Luengo lluengo at dgeo.udec.cl
Fri Jan 23 14:55:25 UTC 2009


Ulf Rompe wrote:
> Am Donnerstag, den 22.01.2009, 22:37 +0000 schrieb Oliver Marshall:
>   
>> Sudo cp /folder/k8[100-945] /folder2 blah blah
>>
>>  
>>
>> But that tells me there are no folders called k8[100-945]. However the
>> following does work;
>>
>>  
>>
>> Sudo cp /folder/k810[0-9] /folder2 blah blah
>>     
>
> Try sequences instead of character groups. Bash has built in support for
> sequences:
>
> sudo cp /folder/k8{100..945} /folder2/
>
> [x] ulf
>   
Great!! i didn't know that!

-- 
Lorenzo Luengo Contreras
Administrador de Sistemas DGEO
Universidad de Concepción
Concepción - Chile
+56-41-2207277





More information about the ubuntu-users mailing list