Date: Fri, 01 Oct 2004 08:45:34 -0400 From: "Brandon S. Allbery KF8NH" <allbery@ece.cmu.edu> To: =?iso-8859-2?Q?S=B3awek_=AFak?= <szak@era.pl> Cc: freebsd-current@freebsd.org Subject: Re: Bug in #! processing Message-ID: <1096634733.48170.8.camel@rushlight.kf8nh.com> In-Reply-To: <86y8irx5ga.fsf@thirst.unx.era.pl> References: <861xgm5ltz.fsf@thirst.unx.era.pl> <86k6ud2t6t.fsf@thirst.unx.era.pl><415AB9BF.1070003@gamersimpact.com> <86is9wx8qp.fsf@thirst.unx.era.pl> <20040930124810.GA17792@nexus.dglawrence.com> <86y8irx5ga.fsf@thirst.unx.era.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2004-09-30 at 09:16, Sławek Żak wrote: > "David G. Lawrence" <dg@dglawrence.com> writes: > > The #! is required to be in the first two bytes of the file, so there > > can't be any spaces before it. > > Oh. Thus in following script: > > thirst<zaks>(1950)% cat tst.sh > #!/bin/no-such-file > ps -lp $$ exec*() fails in that case, and shells assume it's a sh script. csh (used to?) assume a csh script if the first character is #, or you can use "alias shell" to tell it which shell to assume. This is how scripts worked before #!. -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [WAY too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon univ. KF8NH
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1096634733.48170.8.camel>