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!
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2306
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
     1
#!/bin/bash
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
     2
#
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
     3
# ucat - uninterruptible cat
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
     4
# NOTE: If perl is unavailable we simply fall back on normal cat!
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
     5
#
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
     6
# $Id$
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
     7
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
     8
PERL=$(type -path perl)
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
     9
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
    10
if [ -z "$PERL" ]
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
    11
then
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
    12
  exec cat "$@"
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
    13
else
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
    14
  exec $PERL -e '$SIG{INT} = "IGNORE"; $| = 1; while (<ARGV>) {print;}' "$@"
0aadfaf8557a ucat - uninterruptible cat
wenzelm
parents:
diff changeset
    15
fi