Bash

Resources:

Recommended free resources for beginning users:

Recommended free resources for intermediate users:

Recommended free resources for advanced users:

Quick References:


Recommended book for beginning users:

Recommended book for intermediate-advanced users:

Notes:

If you are testing an output or variable that may be null it is necessary to include it in double quotes!

if [ -n "$thisvariabledoesnotexist" ]; then
    echo "run!"
fi

or
if [ -n "`echo $thisvariabledoesnotexist`" ]; then
    echo "run!"
fi

Otherwise, if the variable or output is null then the script will crash!

[http://chris-lamb.co.uk/2008/01/24/can-you-get-cp-to-give-a-progress-bar-like-wget/]

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License