1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

simulate terminal utility (squash)

This commit is contained in:
Ulrich Hornung 2024-02-07 22:02:19 +01:00
parent 5a2e0c700e
commit a4d5defeef
No known key found for this signature in database
GPG key ID: 64EA3BAAF1BC0603
5 changed files with 348 additions and 29 deletions

21
tests/fixtures/nohup/is_atty.sh vendored Normal file
View file

@ -0,0 +1,21 @@
#!/bin/bash
if [ -t 0 ] ; then
echo "stdin is atty"
else
echo "stdin is not atty"
fi
if [ -t 1 ] ; then
echo "stdout is atty"
else
echo "stdout is not atty"
fi
if [ -t 2 ] ; then
echo "stderr is atty"
else
echo "stderr is not atty"
fi
true

23
tests/fixtures/util/is_atty.sh vendored Normal file
View file

@ -0,0 +1,23 @@
#!/bin/bash
if [ -t 0 ] ; then
echo "stdin is atty"
else
echo "stdin is not atty"
fi
if [ -t 1 ] ; then
echo "stdout is atty"
else
echo "stdout is not atty"
fi
if [ -t 2 ] ; then
echo "stderr is atty"
else
echo "stderr is not atty"
fi
>&2 echo "This is an error message."
true