Reputation: 297
I am being stuck at some image editing using bash commands. I have 414 images labelled 1file.png 2file.png ... 414file.png. To each of these I would like to add the number, which is already present in the name. The goal is to create a .gif which will show the counts of images in one corner counting up. (Creating the .gif using convert * result.gif works)
The problem is it will not add my number in the image but literally print $i. Does somebody know how to read in the loop variable?
I have tried:
for i in {0..9}; do
convert -pointsize 80 -fill black -draw 'text 1650 400 "$i"' "$i"file.png "$i"file.png;
done
Many thanks in advance.
Upvotes: 3
Views: 3540
Reputation: 297
Problem solved:
for i in {0..1}; do
convert -pointsize 80 -fill black -draw 'text 1650 400 '\"$i\"'' "$i"file.png "$i"file.png;
done
Upvotes: 4