Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Makefile 上获取 UID。我id -u在提示符中使用,这就是返回我的 UID 没有问题,但在我的 Makefile 中
id -u
perm-user: @echo $(id -u)
那是什么都不回报。有人有想法吗?谢谢你的帮助
转义,$以便 shell 解释它而不是 make。
$
@echo $$(id -u)
不过,没有必要echo。echo $(cmd)是一样的cmd。
echo
echo $(cmd)
cmd
@id -u