我有一个 bash 脚本,我想在其中执行此操作
(in pseudo)
for each item in excludelist
append to string: | grep -v $item
for each file in directory
do
stuff
done
现在
(in real code, the creation and concatenation of f works, the problem is not here I believe)
for i in $EXCLUDE
do
echo $i
f="$f | grep -v $i"
done
for d in `ls $AWSTATSCONF/awstats*conf $f`
do
echo $d
done
输出
ls: |: No such file or directory
ls: grep: No such file or directory
任何和所有的帮助都非常感谢让这个工作。
问候,
阴影