-G FILE (conditional operator)
true
if the file exists and is owned by the effective user ID.
-G
is not included in POSIX.1-2017.
Links
Examples
- Different ways to test if a file is owned by the effective group ID:
1 2 3 4
test -G ~/file && echo "owned by egid" [ -G ~/file ] && echo "owned by egid" # Bash [[ -G ~/file ]] && echo "owned by egid"
BashSupport Pro ist eine Bash IDE mit Unterstützung für -G – probieren Sie es aus!