User Tools

Site Tools


software:shell

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
software:shell [2019/08/25 21:10]
meesters [Best Practices]
software:shell [2019/08/25 21:11] (current)
meesters [Best Practices]
Line 52: Line 52:
 ===== Best Practices ===== ===== Best Practices =====
  
-<WRAP center round important ​90%>+<WRAP center round info 90%>
 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.
 </​WRAP>​ </​WRAP>​
  
-  - //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: <code bash>#​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: <code bash>#​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