Messages in this thread | | | Subject | Re: #!perl - alternative path to script interpreters - patch to 2.2 | Date | Tue, 23 Mar 1999 17:51:28 +0800 | From | David Luyer <> |
| |
The real solution, as it has been since before Linux was even around, is that if you don't know where perl is installed, you make the thing #!/bin/sh and call perl on itself;
It goes something like...
=== #!/bin/sh
eval 'exec perl -w -S $0 ${1+"$@"}' if 0; ===
perl sees the 'if 0' on the next line and knows not to do anything. the shells just execute the first line without looking at the second one.
(grabbed from a random perl script called "HEAD" on my system, I'm sure it can be found in thousands)
The problem has been solved for years. Use the existing solution.
David.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |