shell 遍历一个目录下所有的文件并进行判断时间:2021-04-21 14:29:56for file_a in ${IMX_HOME}/*; do temp_file=`basename $file_a` if [[ $temp_file =~ "Update-v"&&-d $temp_file ]]; then if [[ ! $temp_file =~ $current_version ]];then echo $temp_file | cut -c 9-13 fi fi done