8 May 2020 by Phillip Johnston • Last updated 14 December 2021I recently ran into a strange problem writing a Bash script. I had a command that didn’t work within a shell script. I used echo to print the command out, then ran it in the terminal, and it worked perfectly. # copied output works, shows me the files I’m expecting echo find $DIRS $EXCLUDES -type f $FILE_TYPES # But this does nothing! find $DIRS $EXCLUDES -type f $FILE_TYPES Debugging this problem was quite difficult, until I learned about a variety of helpful techniques. set The set command can be …
Continue reading “Shell Script Debugging Techniques”
