for file in "$1"/* do if [ ! -d "${file}" ] ; then if [[ $file == *.c ]] then blah blah
上面的代码遍历目录中的所有 .c 文件并执行一些操作。我也想包含 .cpp、.h、.cc 文件。如何在同一 if 条件下检查多个文件扩展名?
谢谢
bash grep sed
bash ×1
grep ×1
sed ×1