Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bash command id in my Makefile not working

How do you do to get your UID on Makefile. I use id -u in my prompt and thats return my UID withou problem but in my Makefile

perm-user:
    @echo $(id -u)

That's return nothing. Someone have a idea ? Thanks for your help

like image 500
Nicolas S. Avatar asked May 28 '18 12:05

Nicolas S.


1 Answers

Escape the $ so the shell interprets it rather than make.

@echo $$(id -u)

There's no need for the echo, though. echo $(cmd) is the same as cmd.

@id -u
like image 108
John Kugelman Avatar answered Sep 17 '22 12:09

John Kugelman