-S FILE (conditional operator)
true
if the file exists and is a socket.
Links
Examples
- Different ways to test if a file is a socket:
1 2 3 4
test -S ~/file && echo "socket" [ -S ~/file ] && echo "socket" # Bash [[ -S ~/file ]] && echo "socket"
BashSupport Pro is a Bash IDE with support for -S – try it now!