I thought that make interprets the rule's set of commands literally, passing them to the sub-shell. But this doesn't seem to work in this case:default: loop        echo $$RANDOM This prints echo $RANDOM in my shell but doesn't actually print the number.
How to use bash variables inside make
bash;make;gnu make