-- Leo's gemini proxy

-- Connecting to freeshell.de:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

test


> Check file types and compare values.

> Returns 0 if the condition evaluates to true, 1 if it evaluates to false.

More information.


Test if a given variable is equal to a given string:

test "{$MY_VAR}" == "{/bin/zsh}"

Test if a given variable is empty:

test -z "{$GIT_BRANCH}"

Test if a file exists:

test -f "{path/to/file_or_directory}"

Test if a directory does not exist:

test ! -d "{path/to/directory}"

If-else statement:

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).

CC-BY



-- Response ended

-- Page fetched on Tue May 21 08:09:39 2024