-R VAR (conditional operator)

true if the shell variable VAR is set and is a name.

-R is not included in POSIX.1-2017.

Examples

Different ways to test if a shell variable is set and is a name:
1
2
3
4
test -R var && echo "set"
[ -R var ] && echo "set"
# Bash
[[ -R var ]] && echo "set"
BashSupport Pro ist eine Bash IDE mit Unterstützung für -Rprobieren Sie es aus!
© 2020–2023 Joachim Ansorg
Impressum
Datenschutz
Rechtliches