使用命令行执行和查看 bash 命令
我有一行代码可以批量转换图像,但它没有显示当前正在操作的图像。有没有办法可以插入echo以显示当前正在执行的命令?
for i in *.jpg; do convert $i -filter Lanczos -resize 50% converted_$i.jpeg; done;
Example:
After each line it I would like it to show the file it's converting
img1.jpeg converted
img2.jpeg converted
Run Code Online (Sandbox Code Playgroud)
PS:我想从命令行运行它。我不想创建一个单独的文件并运行该文件。