我有以下命令。
$ echo \\newcommand{\\coverheight}{11.0in} > tmp
$ cat tmp
echo \\newcommand{\\coverheight}{11.0in} > tmp
但是当我在Makefile中使用相同的echo
命令时,它没有正确地写入文件。
# Makefile
all:
printf '\\newcommand{\\coverheight}{11.0in}' > tmp
运行`make'后,输出结果为:
$ cat tmp
ewcommand{
如何使用 Makefile
和 echo
正确地写入文件?