File names with spaces in BASH

前端 未结 7 1388
清酒与你
清酒与你 2020-12-03 07:54

I\'m trying to write script that\'ll crop and resize large photos into HD Wallpapers.

#! /bin/bash


for i in `ls *.jpg`
do
    width=`identify -format \'%w         


        
7条回答
  •  感动是毒
    2020-12-03 08:57

    Use double quotes around file names. Like this:

    width=`identify -format '%w' "$i"`
    

    Please note the double quotes around "$i".

提交回复
热议问题