1、怎么判断插件是否已经安装(dpkg)
2、数组循环
3、获取执行命令的返回值
arr=(ffmpeg imagemagick unzip)
for x in ${arr[@]};
do
a=`dpkg -l | grep $x`
if [ -z "$a" ]; then
echo $x"未安装"
fi
if [ -n "$a" ]; then
echo $x"已经安装"
fi
done
4、遍历文件夹下文件
for y in "img/*.png";
do
echo $y
echo "\n"
done