I have the idea that I would like to add an environment variable ("waitTillReady") to my ~/.bashrc file, such that instead of doing this:
while [ "$(pidof -s make)" -o "$(pidof -s gcc)" -o "$(pidof -s ld)" ]; do echo "Still compiling..." && sleep 1; done && printf "\n%.0s" {1..20} && date && echo "THINGS ARE READY FOR YOU NOW..."
I want to be able to do this:
$waitTillReady && echo "THINGS ARE READY FOR YOU NOW..."
I tried to edit my ~/.bashrc file like with different combinations of the following:
...
export waitTillReady="while [ "$(pidof -s make)" -o "$(pidof -s gcc)" -o "$(pidof -s ld)" ]; do echo "Still compiling..." && sleep 1; done && printf "\n%.0s" {1..20} && date"
...
E.g. I tried to enclose everything insider a single quote ' and I tried to escape the \" in the middle... Could anyone please help and tell what I should write in the ~/.bashrc file, after the "export waitTillReady=" line?
I would be grateful to hear any suggestions/ideas (and maybe an explanation of what I'm doing wrong), thanks!