for loop and space character in names
Hi
I am trying to convert a large number of JPG files into PNG. For this purpose I tried "for" loop as follows: Code:
for i in *.jpg;do convert $i $i.png;done Quote:
Thanks |
try this:
Code:
for i in *.jpg;do convert "$i" "$i.png";done |
Quote:
Thanks a lot :hattip: |
A modifier chops off the old extension:
Code:
convert "$i" "${i%.*}.png" |
The code in your top post would work as-is if you use ZSH.
|
All times are GMT -5. The time now is 12:15 AM. |