#!/bin/sh # Detect whether /dev/tty is available & functional if sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then exec