I am trying to run 10 instances of a BASH function simultaneously with GNU Parallel
The BASH function downloads tiles from an image and stitches them together - first single rows, then each column - to a single image file.
function DOWNLOAD_PAGE {
for PAGE in {0041..0100}
do
for COLUMN in {0..1}
do
for ROW in {0..2}
do wget -O "$PAGE"_"$COLUMN"_"$ROW".jpg "http://www.webb$PAGE$COLUMN$ROW"
done
convert "$PAGE"_"$COLUMN"_*.jpg -append "$PAGE"__"$COLUMN".jpg
done
convert "$PAGE"__*.jpg +append "$PAGE"_done.jpg
done
}
Unfortunately, the apparently obviuous solutions - the first one being
export -f DOWNLOAD_PAGE
parallel -j10 DOWNLOAD_PAGE
do not work.
Is there a way to do this using GNU Parallel?