On Sun, Jun 16, 2013 at 2:09 AM, Ole Tange <[email protected]> wrote:
> On Mon, Jun 3, 2013 at 9:52 PM, Tyler Thorsted <[email protected]> 
> wrote:
:
>> ie.
>>
>> M1234_b0000_f0001_00001.tif
>> M1234_b0000_f0001_00002.tif
>> M1234_b0000_f0001_00003.tif
>> M1234_b0000_f0001_00004.tif
>>
>> all jpg images would process to a directory named M1234_b0000_f0001
>
> Process the files in the same dir and then run:
>
> ls | grep jpg | rename '/(.*)(.{6})/; mkdir $1; $_="$1/$_"'

If you use BASH this would also work:

parallel 'A={};B=${A/%??????????/}; mkdir -p $B; convert {}
$B/{.}.jpg' ::: *.tif

/Ole

Reply via email to