[

Evaluate condition. Returns 0 if the condition evaluates to true,…

[

Evaluate condition. Returns 0 if the condition evaluates to true, 1 if it evaluates to false. More information: https://www.gnu.org/software/coreutils/test.

[ "{{$MY_VAR}}" == "{{/bin/zsh}}" ]

[ -z "{{$GIT_BRANCH}}" ]

[ -f "{{path/to/file_or_directory}}" ]

[ ! -d "{{path/to/directory}}" ]

[ {{condition}} ] && {{echo "true"}} || {{echo "false"}}

Также может быть вам интересно:
КодТрюки BashНастройкиТерминал/Консоль
[[ →