Hacker News new | ask | show | jobs
by kl4m 3446 days ago
And 90% of that 90% has that tiny modification that is a nightmare to debug.
2 comments

What he wanted to say: you can debug since context is very local. (not taking sides)
Use `set -x` or `bash -x script.sh` to trace shell script execution. Shell scripts are easy to debug.
I call this to drop into an immediate repl at the point of invocation in a language that doesn't hate me (Ruby):

     require 'pry'; binding.pry
This is, in fact, 2017. One might call it the current year. The stone knives and bearskins of shell scripting have not kept apace with, like...anything else in our industry. You might be comfortable with them, but that doesn't make it easy, it means you have frayed countless synapses learning it.