summaryrefslogtreecommitdiff
path: root/eg/nih
diff options
context:
space:
mode:
Diffstat (limited to 'eg/nih')
-rw-r--r--eg/nih10
1 files changed, 10 insertions, 0 deletions
diff --git a/eg/nih b/eg/nih
new file mode 100644
index 0000000000..15cb60f496
--- /dev/null
+++ b/eg/nih
@@ -0,0 +1,10 @@
+eval "exec /usr/bin/perl -Spi.bak $0 $*"
+ if $running_under_some_shell;
+
+# $Header: nih,v 2.0 88/06/05 00:16:54 root Exp $
+
+# This script makes #! scripts directly executable on machines that don't
+# support #!. It edits in place any scripts mentioned on the command line.
+
+s|^#!(.*)|#!$1\neval "exec $1 -S \$0 \$*"\n\tif \$running_under_some_shell;|
+ if $. == 1;