一行指令將 PNG 轉換成 WebP

指令

array=($(ls *.png)); for key in "${array[@]}"; do cwebp $key -o $key.webp; done && mv *.webp ./webp

解釋

array=($(ls *.png));
for key in "${array[@]}"; do cwebp $key -o $key.webp; done
&& mv *.webp ./webp

備註


Revision #2
Created 3 March 2024 06:17:00 by Nesquate
Updated 4 March 2024 10:52:47 by Nesquate