File Tests for Unix File Handle Types
Operator Meaning -p Returns true if this file is a named pipe. -S Returns true if this file is a socket. -t Returns true if this file is a tty device.