💾 Archived View for freeshell.de › tldr › [[.gmi captured on 2023-07-22 at 17:24:29. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-28)

-=-=-=-=-=-=-

[[

Check file types and compare values.
Returns 0 if the condition evaluates to true, 1 if it evaluates to false.

More information.

[[ ${variable} {==|!=} "{string}" ]]
[[ ${variable} {==|=~} {pattern} ]]
[[ ${variable} -{eq|ne|gt|lt|ge|le} {integer} ]]
[[ -n ${variable} ]]
[[ -z ${variable} ]]
[[ -f {path/to/file} ]]
[[ -d {path/to/directory} ]]
[[ -e {path/to/file_or_directory} ]]
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