Naveed
Naveed

Reputation: 602

GNU parallel nesting

I have a directory of 130000+ .tif files. I want to use find with GNU parallel. All my files are named in the pattern and sequence of k-001 to k-163. One of the challenges is matching 001 with seq 1.

I tried this:

seq 111 163 | parallel -j10 find . -name 'k-{}\*' -print0 | parallel -0 'tesseract {/} /mnt/ramdisk/output/{/.} > /dev/null 2>&1'

I am not getting parallelism from the seq part. Where am I going wrong?

Upvotes: 1

Views: 234

Answers (1)

Mark Setchell
Mark Setchell

Reputation: 207445

Not sure what the actual issue is, but you can generate zero-padding like this if that is the problem:

printf "%03d\n" {0..10} | parallel -k echo
000
001
002
003
004
005
006
007
008
009
010

Upvotes: 1

Related Questions