This line of code took me half an hour to write and test. (Broken into multiple lines for readability.)
echo \\t-ps -ef '|'
awk \'$$''$$\1 = \"$${LOGNAME}\"
\&\& /`basename $${exe}`/ \&\& !/awk/
{print $$''$$\2}\' '|'
xargs -n 1 kill -9 >> ${MAKE_DEPEND};
This code is part of a makefile action that outputs a makefile rule. This particular line causes the output rule to kill a running executable, prior to linking it. I wrote it because I was sick of getting 'Text file busy' errors, and having to restart the make.
I am particularly proud of the $$''$$ bit. That is how to output two consecutive dollar signs into the generated make rule. $$$$ must be some kind of reserved symbol in our ancient version of make, because it causes a five digit number to be output.
Comments
Make will translate $$$$ from the Makefile into just $$ on the command line. Just as a shell sees $FOO as a request for the the value of the variable named 'FOO', it sees $$ as a request for the value of the variable named '$'. Most UNIX shells put the PID of the shell in this variable.
So, it is the shell that is generating this five digit number (its own PID), not make.
Yep - that sounds right.