lib/scripts/ucat
author wenzelm
Wed, 04 Dec 1996 12:30:49 +0100
changeset 2306 0aadfaf8557a
child 2307 508d2a233dbc
permissions -rwxr-xr-x
ucat - uninterruptible cat NOTE: If perl is unavailable we simply fall back on normal cat!

#!/bin/bash
#
# ucat - uninterruptible cat
# NOTE: If perl is unavailable we simply fall back on normal cat!
#
# $Id$

PERL=$(type -path perl)

if [ -z "$PERL" ]
then
  exec cat "$@"
else
  exec $PERL -e '$SIG{INT} = "IGNORE"; $| = 1; while (<ARGV>) {print;}' "$@"
fi