I'm trying to learn how to use the signal trap command on Bash. The trap command is quite easy to use, but the issue that hangs in my head is the importance of using single and double quotes.
What is the difference between the single and double quotes used with the
trapcommand ?Can you give a few simple examples that clearly show the difference between the two uses ?
trapcommand wrt. single or double quotes. If in doubt, use a function:deb(){ echo "' ${BASH_COMMAND[@]}"; }; trap deb DEBUG