true, false and : commands
Infinite Loop
Section titled “Infinite Loop”while true; do echo okdoneor
while :; do echo okdoneor
until false; do echo okdoneFunction Return
Section titled “Function Return”function positive() { return 0}
function negative() { return 1}Code that will always/never be executed
Section titled “Code that will always/never be executed”if true; then echo Always executedfiif false; then echo Never executedfiSyntax
Section titled “Syntax”- true, : - always return 0 as exit code.
- false - always returns 1 as exit code.