#!/bin/sh if [ -t 0 ] then echo "Input is a terminal" else echo "Input is NOT a terminal" fi