DEV Community

loading...

Discussion on: Command Line Interface Photographs Conversion

Collapse
shaiay profile image
shaiay

I'm not sure why you need the $filename variable.
Why not use $i as the filename?

for i in *.jpg; do
    gm convert -size 85x85 "$i" -resize 85x85 +profile "*" "output/$i"
done
Collapse
egimba profile image
Eric Gitonga Author

Thank you for pointing that out. I don't need it really, I just used it as is from the example I found online. Using $i definitely saves on the typing!