[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cropping a large collection of .PNG screenshots



On 2014-04-13, Andrei POPESCU <andreimpopescu@gmail.com> wrote:
>
>> for i in `ls *.png`;
>
> Is there something wrong with
>
>     for i in *.png

According to this, there is everything right:

http://mywiki.wooledge.org/BashPitfalls#for_i_in_.24.28ls_.2A.mp3.29

# POSIX
for i in *.png; do
    [ -e "$i" ] || continue
    some command "$i"
done


Reply to: