for file in *.gif; do convert ${file} ${file%gif}png; done
Note that the %gif removes gif from the file name for you. If you are trying to create such a one-liner it is very convenient to use echo to first print commands before actually executing them, so
for file in *.gif; do echo convert ${file} ${file%gif}png; done
is harmless but gives you an indication of what will happen.
No comments:
Post a Comment