fd=0; [ -t "${fd}" ] || [ -p /dev/stdin ]; echo $?
# fd=0; if [ -t "${fd}" ] || [ -p /dev/stdin ]; then return 0; else return 1; fi
