思路:修改 IFS="\n\b"

$1;查找的目录路径

!/bin/bash

SAVEIFS=$IFS
IFS="\n\b"

for file in $(find $1 -maxdepth 1 -iname "*.jpg" -type f )
do
echo file
done

IFS=$SAVEIFS

posted on 2023-07-20 15:17  keleman  阅读(41)  评论(0编辑  收藏  举报