diff options
Diffstat (limited to 'eg')
-rw-r--r-- | eg/README | 2 | ||||
-rw-r--r-- | eg/nih | 5 | ||||
-rw-r--r-- | eg/sysvipc/ipcmsg | 2 | ||||
-rw-r--r-- | eg/sysvipc/ipcsem | 2 | ||||
-rw-r--r-- | eg/sysvipc/ipcshm | 2 |
5 files changed, 7 insertions, 6 deletions
@@ -13,7 +13,7 @@ of a system to check on and report various kinds of anomalies. If you machine doesn't support #!, the first thing you'll want to do is replace the #! with a couple of lines that look like this: - eval "exec /usr/bin/perl -S $0 $*" + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell; being sure to include any flags that were on the #! line. A supplied script @@ -1,4 +1,4 @@ -eval "exec /usr/bin/perl -Spi.bak $0 $*" +eval 'exec /usr/bin/perl -Spi.bak $0 ${1+"$@"}' if $running_under_some_shell; # $RCSfile: nih,v $$Revision: 4.1 $$Date: 92/08/07 17:20:27 $ @@ -6,5 +6,6 @@ eval "exec /usr/bin/perl -Spi.bak $0 $*" # 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;| +s[^#!(.*)] + [#!$1\neval 'exec $1 -S \$0 \${1+"\$@"}'\n\tif \$running_under_some_shell;] if $. == 1; diff --git a/eg/sysvipc/ipcmsg b/eg/sysvipc/ipcmsg index 317e027ea7..646d8b6aed 100644 --- a/eg/sysvipc/ipcmsg +++ b/eg/sysvipc/ipcmsg @@ -1,6 +1,6 @@ #!/usr/bin/perl eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' - if 0; + if $running_under_some_shell; require 'sys/ipc.ph'; require 'sys/msg.ph'; diff --git a/eg/sysvipc/ipcsem b/eg/sysvipc/ipcsem index d72a2dd77c..4d871b901a 100644 --- a/eg/sysvipc/ipcsem +++ b/eg/sysvipc/ipcsem @@ -1,6 +1,6 @@ #!/usr/bin/perl eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' - if 0; + if $running_under_some_shell; require 'sys/ipc.ph'; require 'sys/msg.ph'; diff --git a/eg/sysvipc/ipcshm b/eg/sysvipc/ipcshm index d40e46b945..ecc1ba4366 100644 --- a/eg/sysvipc/ipcshm +++ b/eg/sysvipc/ipcshm @@ -1,6 +1,6 @@ #!/usr/bin/perl eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' - if 0; + if $running_under_some_shell; require 'sys/ipc.ph'; require 'sys/shm.ph'; |