if

Performs conditional processing in shell scripts.
See also: test, [.

=> More information.

if {condition_command}; then {echo "Condition is true"}; fi
if ! {condition_command}; then {echo "Condition is true"}; fi
if {condition_command}; then {echo "Condition is true"}; else {echo "Condition is false"}; fi
if [[ -f {path/to/file} ]]; then {echo "Condition is true"}; fi
if [[ -d {path/to/directory} ]]; then {echo "Condition is true"}; fi
if [[ -e {path/to/file_or_directory} ]]; then {echo "Condition is true"}; fi
if [[ -n "${variable}" ]]; then {echo "Condition is true"}; fi
man [
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).

=> CC-BY

Proxy Information
Original URL
gemini://freeshell.de/tldr/if.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en-GB
Capsule Response Time
104.315701 milliseconds
Gemini-to-HTML Time
0.47342 milliseconds

This content has been proxied by September (ba2dc).