1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00
uutils-coreutils/tests/fixtures/nohup/is_a_tty.sh
2024-04-23 19:56:17 +02:00

21 lines
274 B
Bash

#!/bin/bash
if [ -t 0 ] ; then
echo "stdin is a tty"
else
echo "stdin is not a tty"
fi
if [ -t 1 ] ; then
echo "stdout is a tty"
else
echo "stdout is not a tty"
fi
if [ -t 2 ] ; then
echo "stderr is a tty"
else
echo "stderr is not a tty"
fi
true