software:shell

# Differences

This shows you the differences between two versions of the page.

 software:shell [2019/08/25 21:10]meesters [Best Practices] software:shell [2019/08/25 21:11] (current)meesters [Best Practices] Both sides previous revision Previous revision 2019/08/25 21:11 meesters [Best Practices] 2019/08/25 21:10 meesters [Best Practices] 2019/08/23 21:16 meesters [Other Shells] 2019/08/20 20:27 meesters 2019/05/22 09:38 meesters [Best Practices] 2019/01/14 08:58 meesters 2019/01/14 08:55 meesters 2019/01/14 08:54 meesters 2019/01/14 08:39 meesters created 2019/08/25 21:11 meesters [Best Practices] 2019/08/25 21:10 meesters [Best Practices] 2019/08/23 21:16 meesters [Other Shells] 2019/08/20 20:27 meesters 2019/05/22 09:38 meesters [Best Practices] 2019/01/14 08:58 meesters 2019/01/14 08:55 meesters 2019/01/14 08:54 meesters 2019/01/14 08:39 meesters created Line 52: Line 52: ===== Best Practices ===== ===== Best Practices ===== - + This is a completely arbitrary list - and only applicable to Bash! We make no claim for it to be complete. This is a completely arbitrary list - and only applicable to Bash! We make no claim for it to be complete. ​ - - //Always comment your script//\\ \\ This is a recommended practice which is not only applied to shell scripting but all other kinds of programming. Writing comments in a script helps you or some else going through your script understand what the different parts of the script do.\\ \\ For starters, comments are defined using the ‘#’ sign. + - //Always comment your code//\\ \\ This is a recommended practice which is not only applied to shell scripting but all other kinds of programming. Writing comments in a script helps you or some else going through your script understand what the different parts of the script do.\\ \\ For starters, comments are defined using the ‘#’ sign. - //Make a script exit when it fails//\\ \\ Sometimes bash may continue to execute a script even when a certain command fails, thus affecting the rest of the script (may eventually result in logical errors). Use the line below to exit a script when a command fails: #​let script exit if a command fails - //Make a script exit when it fails//\\ \\ Sometimes bash may continue to execute a script even when a certain command fails, thus affecting the rest of the script (may eventually result in logical errors). Use the line below to exit a script when a command fails: #​let script exit if a command fails set -o errexit ​ set -o errexit ​
software/shell.txt · Last modified: 2019/08/25 21:11 by meesters