JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for UK-NEXTSTEP-USERS Archives


UK-NEXTSTEP-USERS Archives

UK-NEXTSTEP-USERS Archives


UK-NEXTSTEP-USERS@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

UK-NEXTSTEP-USERS Home

UK-NEXTSTEP-USERS Home

UK-NEXTSTEP-USERS  2001

UK-NEXTSTEP-USERS 2001

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Assignment to a Key, Part II

From:

Chris Bidmead <[log in to unmask]>

Reply-To:

NeXT users discussion list: hardware,[NEXT|OPEN|GNU]STEP, Darwin/Mac OS X,WebObjects" <[log in to unmask]>

Date:

Sat, 24 Nov 2001 15:54:41 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (35 lines)

On Saturday, November 24, 2001, at 03:21  pm, Pete French wrote:

> this is one of the great beauties of UNIX, the fact that you can take
> interpretted code and run it in a way that is directly equivalent to
> a compiled binary file as far as the system is concernned.

I'd be inclined to quarrel with this interpretation, Pete.  What the
kernel is doing isn't taking the script and running it as a binary --
specifically its:

1. looking for the hash bang and reading what comes after that.

2. loading that code as if it were a binary (er, which it is. eg sh, awk
or sed)

3. ducking out and letting the binary get on with doing its thing (eg
running the script).

The script remains a script.  It isn't magically turned into a binary by
hash-bang; it still has to be interpreted by the actual binary runtime
environment provided by sh, awk or sed, and the bytestream the kernel gets
to see is no different from what it would see if the same script were run
conventionally using "sh <script>".

So, yes, the kernel is smart to recognise hash-bang as "run what follows
on this line".  But once that is done, what follows (sh, awk or sed or
whatever) also has to be smart to recognise that in this case the -f flag
refers to the following lines of script, not to an external script file
that needs sh assistance to load).

I think...

--
el bid

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
December 2022
February 2022
February 2021
January 2021
October 2020
August 2015
February 2015
June 2013
July 2012
May 2012
November 2011
October 2011
September 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
September 2010
June 2010
March 2010
February 2010
January 2010
November 2009
July 2009
March 2009
February 2009
January 2009
November 2008
June 2008
April 2008
March 2008
January 2008
December 2007
October 2007
July 2007
June 2007
April 2007
January 2007
December 2006
October 2006
September 2006
August 2006
July 2006
June 2006
April 2006
March 2006
February 2006
January 2006
November 2005
October 2005
June 2005
May 2005
March 2005
February 2005
January 2005
2004
2003
2002
2001
2000
1999
1998


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager