Exit from Bash script on error without closing the terminal window
To terminate the script in case of an error, we can use the “-e” option. When a bash script is “sourced”, called from an alias with a leading dot like my-alias='. /my-script to execute in the same process, or a function is…
extra characters at the end of n command
When you use sed to insert a template file into another file with the command and get the error message extra characters at the end of n command Make sure the template file supplied in $1 does not have an empty line at the top.
delimited by end-of-file (wanted `EOF’)
When you create a file in a script and use an end of file delimiter, if ... cat <<EOF> $chef_dir/attrib.json $json EOF fi and you indent the word EOF to look nicer, you will get the error message warning: here-document at line … delimited…