我有一个从命令行成功运行的命令并将其变为:
1 first line
2 second line
3 third line
4 fourth line
extra bit
5 fifth line
6 sixth line
进入这个:
1 first line
2 second line
3 third line
4 fourth line; extra bit
5 fifth line
6 sixth line
这是命令:
printf "%s\n" '2,$g/^[^0-9]/-1s/$/; /\' '.,+1j' w | ed -s file
它在从命令行运行时起作用。但是,当我尝试从 makefile 运行相同的东西时,file
它并没有改变,并且我收到以下错误消息:
$ make
printf "%s\n" '2,/^[^0-9]/-1s/; /\' '.,+1j' w | ed -s file
?
make: *** [make] Error 2
这是生成文件,包含相同的命令:
make:
printf "%s\n" '2,$g/^[^0-9]/-1s/$/; /\' '.,+1j' w | ed -s file
我怎样才能让这个命令运行make
?