ucat - uninterruptible cat
authorwenzelm
Wed, 04 Dec 1996 12:30:49 +0100
changeset 2306 0aadfaf8557a
parent 2305 35f78d6c4faa
child 2307 508d2a233dbc
ucat - uninterruptible cat NOTE: If perl is unavailable we simply fall back on normal cat!
lib/scripts/ucat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/scripts/ucat	Wed Dec 04 12:30:49 1996 +0100
@@ -0,0 +1,15 @@
+#!/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