shell: 遍历目录下的文件并查看

CRTDIR=$(pwd)
S="/"
ls .| grep ifc | while read file
do
  if test -f $file
  then
    echo "#cat "$CRTDIR$S$file
    cat $CRTDIR$S$file
  fi
done

你可能感兴趣的:(linux进阶学习,linux,服务器,运维)