今天再写一个makefile 时
clean-temp:
rm ` ls -a |grep ~$`
但是这样写不能完成,只能在terminal当中完成
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 1: Syntax error: unexpected end of file
Makefile:2: recipe for target 'clean-temp' Failed
make: *** [clean-temp] Error 1
原因:
makefile 指挥把 $$替换成$.
所以改成:
clean-temp: rm ` ls -a |grep ~$$`就ok了!
原文链接:https://www.f2er.com/regex/359475.html