Eli
Eli

Reputation: 81

GNU parallel format

This is a silly question. I want to apply a "convert ..." operation on a list of files. I have been able to successfully apply it using a find operator:

find $FolderA/ -name "*.dcm" | parallel --will-cite "convert {} -resize %50 $FolderB/{/.}.png"

I want to replicate this command to a specific list of files. I have tried:

parallel "convert $FolderA/{} -resize %50 $FolderB/{/.}.png :::file1 file2 file3...

but it does not work. Parallel just hangs with

parallel: Warning: Input is read from the terminal. Only experts do this on purpose. Press CTRL-D to exit

Any idea what is the right syntax for a list of files?

Upvotes: 1

Views: 87

Answers (1)

Mark Setchell
Mark Setchell

Reputation: 207465

This should work for you:

parallel convert "$FolderA/{}" -resize 50% "$FolderB/{/.}.png" ::: file1.dcm file2.dcm

Upvotes: 1

Related Questions