💾 Archived View for freeshell.de › tldr › test.gmi captured on 2022-06-11 at 23:52:28. Gemini links have been rewritten to link to archived content
⬅️ 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.
test "{$MY_VAR}" == "{/bin/zsh}"
test -z "{$GIT_BRANCH}"
test -f "{path/to/file_or_directory}"
test ! -d "{path/to/directory}"
test {condition} && {echo "true"} || {echo "false"}
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).