Use the Make shell
builtin like in MY_VAR=$(shell echo whatever)
me@Zack:~$make
MY_VAR IS whatever
me@Zack:~$ cat Makefile
MY_VAR := $(shell echo whatever)
all:
@echo MY_VAR IS $(MY_VAR)
More Related Contents:
- Escaping in makefile
- Can GNU make handle filenames with spaces?
- How to set child process’ environment variable in Makefile
- How to source a script in a Makefile?
- How can I check if a command exists in a shell script? [duplicate]
- How can I shuffle the lines of a text file on the Unix command line or in a shell script?
- How to invoke bash, run commands inside the new shell, and then give control back to user?
- Getting the last argument passed to a shell script
- What is the difference between $@ and $* in shell scripts?
- Remove duplicate lines without sorting [duplicate]
- Run java jar file on a server as background process
- How does the #! shebang work?
- Need bash shell script for reading name value pairs from a file
- How can I negate the return-value of a process?
- Passing argument containing space in shell script
- Unix find command, what are the {} and \; for?
- How to exclude this / current / dot folder from find “type d”
- Losing newline after assigning grep result to a shell variable
- \r character in shell script
- Shell one liner to prepend to a file
- How to set environment variables from .env file
- Why 0 is true but false is 1 in the shell?
- How is % (percent sign) special in crontab?
- Write byte at address (hexedit/modify binary from the command line)
- sh read command eats backslashes in input?
- Redirecting/storing output of shell into GDB variable?
- How do I set tmux to open specified windows at startup?
- Take a full page screenshot with Firefox on the command-line
- “No such file or directory” but it exists
- How to check if an URL exists with the shell and probably curl?