lib/scripts/ucat
changeset 2306 0aadfaf8557a
child 2307 508d2a233dbc
equal deleted inserted replaced
2305:35f78d6c4faa 2306:0aadfaf8557a
       
     1 #!/bin/bash
       
     2 #
       
     3 # ucat - uninterruptible cat
       
     4 # NOTE: If perl is unavailable we simply fall back on normal cat!
       
     5 #
       
     6 # $Id$
       
     7 
       
     8 PERL=$(type -path perl)
       
     9 
       
    10 if [ -z "$PERL" ]
       
    11 then
       
    12   exec cat "$@"
       
    13 else
       
    14   exec $PERL -e '$SIG{INT} = "IGNORE"; $| = 1; while (<ARGV>) {print;}' "$@"
       
    15 fi