hamin.se
  • About
  • All posts

The best way to test a script - Wed, Jan 29, 2014

  1. Echo every line that does something significant
  2. Run with a cleared path:
env -i /path/to/script.sh
  1. Run with both a cleared path and a trace of what’s happening:
env -i sh -x /path/to/script.sh

Back to Home


© 2024 | Built on Hugo

Twitter Linkedin GitHub