Changes

Jump to navigation Jump to search
242 bytes added ,  07:34, 24 February 2017
Line 308: Line 308:     
</source>
 
</source>
 +
 +
=== Logging ===
 +
 +
 +
For logging, you can wrap sections of your script in curly braces and redirect the stdout to a log file:
 +
<source lang=bash>
 +
{
 +
    script_command_1
 +
    script_command_2
 +
    script_command_3
 +
} >> /path/to/log_file
 +
</source>
 +
 
=== Links ===
 
=== Links ===
 
[http://tldp.org/LDP/abs/html/ Advanced Bash-Scripting Guide]
 
[http://tldp.org/LDP/abs/html/ Advanced Bash-Scripting Guide]

Navigation menu