Assert Failure in Bash Scripting
Cases when you need the bash script to assert_failure in tests. You can use exit to throw an error.
main (){ if [ $# -eq 1 ] then echo "Hello, $1" else echo "Error" exit 1 fi } main "$@"
Read more on exit codes
Cases when you need the bash script to assert_failure in tests. You can use exit to throw an error.
main (){ if [ $# -eq 1 ] then echo "Hello, $1" else echo "Error" exit 1 fi } main "$@"
Read more on exit codes