From: Klaus Ethgen <klaus+usenet@ethgen.de>
To: zsh-workers@zsh.org
Subject: Re: Bang Executing Perl Scripts
Date: Tue, 25 Jan 2011 12:42:04 +0100 [thread overview]
Message-ID: <slrnijtdoo.re7.klaus+usenet@ikki.ethgen.de> (raw)
In-Reply-To: <1246B8BF-933E-4143-9B06-62197CE64B94__21660.9615985819$1295907908$gmane$org@free.fr>
Moin,
François Revol <revol@free.fr> schrieb:
>> Why not putting #!/usr/bin/perl as the first line of your perl scripts?
>
> This is not portable.
Portable enough today. But if you want to support minor OSs like BeOS or
windows ...
> BeOS and Haiku do not have /usr for ex, so perl is elsewhere.
> (and so is env, so using #!/usr/bin/env perl is just moving the problem around)
... look at »perldoc perlrun«:
#!/bin/sh
#! -*-perl-*-
eval 'exec perl -x -wS $0 ${1+"$@"}'
if 0;
There is a pretty good change that /bin/sh is available on relevant
systems. But also for this solution, you cannot support all exotic
systems.
-- Klaus
--
Klaus Ethgen http://www.ethgen.ch/
pub 2048R/D1A4EDE5 2000-02-26 Klaus Ethgen <Klaus@Ethgen.de>
Fingerprint: D7 67 71 C4 99 A6 D4 FE EA 40 30 57 3C 88 26 2B
next parent reply other threads:[~2011-01-25 12:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Xns9E77D2686F135zzappergmailcom@80.91.229.10>
[not found] ` <AANLkTimSXtDjkw2DhfxTHWYPSBPpnwnbjPueC0RS-9qJ@mail.gmail.com>
[not found] ` <1246B8BF-933E-4143-9B06-62197CE64B94__21660.9615985819$1295907908$gmane$org@free.fr>
2011-01-25 11:42 ` Klaus Ethgen [this message]
2011-01-25 14:42 ` François Revol
2011-01-25 18:55 ` Phil Pennock
2011-01-25 19:38 ` [OT] " François Revol
2011-01-26 13:11 ` Klaus Ethgen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=slrnijtdoo.re7.klaus+usenet@ikki.ethgen.de \
--to=klaus+usenet@ethgen.de \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).