On Fri, 2005-05-13 at 13:09 +0200, Alf-Ivar Holm wrote:
> When shÂ is started with a file name as argument, it tries to parse
> the file as shell commands. It does _not_ look for magic strings (!#
> in this case) in the file, it just try to execute each line, where the
> first line will be taken for a comment in sh.
True. My fault. That's is the responsibility of the loader (ld) not
the shell. The correct thing would be (as you said): âperl secede2.plâ.
> Indeed, the executable bit is not important in this case, but the
> command "sh secede2.pl" will most probably fail big time, since Perl
> commands are given to a shell interpreter. "perl secede2.pl" on the
> other hand, is the correct way of a non-magic run of the perl program.
> Â) For Ubuntu, sh is actually a link to bash(1) and not Bourne Shell,
> which is what sh usually designates.
True. But âbashâ will run in âshâ compatibility mode (that is, without
any new features introduced with âbashâ) if called as âshâ.
Thanks for the corrections.
ubuntu-users mailing list