User Tools

Site Tools


sandbox:shell-scripting

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
shell-scripting [2018/06/27 12:07] dreiggyshell-scripting [2018/06/27 12:58] dreiggy
Line 1: Line 1:
 ====== Shell scripting ====== ====== Shell scripting ======
 Here will be some useful examples and snippet Here will be some useful examples and snippet
- 
-===== Debug scripts ===== 
- 
-<code bash> 
-# sh -x some-script-name.sh 
-</code> 
  
 ===== Links ===== ===== Links =====
Line 14: Line 8:
   * Prevent CRON from overlapping: https://ma.ttias.be/prevent-cronjobs-from-overlapping-in-linux/   * Prevent CRON from overlapping: https://ma.ttias.be/prevent-cronjobs-from-overlapping-in-linux/
   * bash colors: https://stackoverflow.com/a/28938235/4485894   * bash colors: https://stackoverflow.com/a/28938235/4485894
 +
 +===== Debug scripts =====
 +
 +<code bash>
 +# sh -x some-script-name.sh
 +</code>
 +
 +===== Differences between single and double quotes =====
 +
 +Single quotes won't interpolate anything, but double quotes will. For example: variables, backticks, certain \ escapes, etc.
 +
 +<code bash>
 +$ echo "$(echo "upg")"
 +upg
 +$ echo '$(echo "upg")'
 +$(echo "upg")
 +</code>
 +
 +
 +
 +
sandbox/shell-scripting.txt · Last modified: 2019/09/17 21:47 by dreiggy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki