FreeBSD Manual Pages
ISATTY(1) fish-shell ISATTY(1) NAME isatty - test if a file descriptor is a terminal SYNOPSIS isatty [FILE DESCRIPTOR] DESCRIPTION isatty tests if a file descriptor is a terminal (as opposed to a file). The name is derived from the system call of the same name, which for historical reasons refers to a teletypewriter (TTY). FILE DESCRIPTOR may be either the number of a file descriptor, or one of the strings stdin, stdout, or stderr. If not specified, zero is as- sumed. If the specified file descriptor is a terminal device, the exit status of the command is zero. Otherwise, the exit status is non-zero. No mes- sages are printed to standard error. EXAMPLES From an interactive shell, the commands below exit with a return value of zero: isatty isatty stdout isatty 2 echo | isatty 1 And these will exit non-zero: echo | isatty isatty 9 isatty stdout > file isatty 2 2> file COPYRIGHT 2021, fish-shell developers 3.3 Apr 04, 2022 ISATTY(1)
NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | COPYRIGHT
Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=isatty&sektion=1&manpath=FreeBSD+13.1-RELEASE+and+Ports>