【发布时间】:2020-12-08 21:19:29
【问题描述】:
我想使用 shell 脚本检查字符串 abcd 是否包含在“/tmp/my 文件夹”目录中的 *.h 文件中的 1 个中
if grep -Fxr 'abcd' "/tmp/my folder/*.h"
then
echo 'yes'
else
echo 'not'
fi
但是我得到一个错误 /tmp/my folder/*.h No such file or directory
我该怎么做?
【问题讨论】: