gpt4 book ai didi

shell - 在 makefile 中转义

转载 作者:太空宇宙 更新时间:2023-11-04 12:01:51 25 4
gpt4 key购买 nike

我试图在 makefile 中执行此操作,但失败得很惨:

M_ARCH := $(shell g++ -dumpmachine | awk '{split($1,a,"-");print a[1]}')

你知道为什么吗?我想这与转义有关,但是什么和在哪里?

最佳答案

这是美元符号,在 makefile 中你必须输入 $$ 来获得一个美元符号:

M_ARCH := $(shell g++ -dumpmachine | awk '{split($$1,a,"-");print a[1]}')

关于shell - 在 makefile 中转义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52130654/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com