• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Inconsistancy Between Do Shell Script and Terminal?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inconsistancy Between Do Shell Script and Terminal?


  • Subject: Re: Inconsistancy Between Do Shell Script and Terminal?
  • From: Bill Briggs <email@hidden>
  • Date: Fri, 14 Jan 2005 22:53:28 -0400

At 6:43 PM -0700 1/14/05, Doug McNutt wrote:
At 21:13 -0400 1/14/05, Bill Briggs wrote:
I note that when you boot in single user mode the shell is sh. Is it "real" sh, or is it also running bash in sh emulation mode?

If you look in /bin/ you'll find two identical executables sh and bash.

I noticed a while back that the byte count was identical for those two files. Wasn't sure of the ramifications, but it didn't seem right for different shells.



The sh copy behaves like sh should because it takes note of the file name.

It is interesting that the usual, in BSD and Linux, structure is to have bash and sh, or csh and tcsh, be hard links to the same executable but Apple does otherwise. There has been some discussion about the way Apple has hacked HFS+ to allow for hard links and they may be terribly inefficient.

Presumably using sh to shebang into bash will require loading two separate copies of the process rather than sharing the identical code in RAM. Does it matter? Perhaps to some and surely to relics of 64 kB UNIX like such as I.

Ugh. Two copies? Shoddy. I don't like that kind of inefficiency either, but I guess with RAM as cheap as it is these days, bloat doesn't seem to bother people that much any more. Well, anyone younger than 40 anyway.


- web
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >RE: Inconsistancy Between Do Shell Script and Terminal? (From: "de Runtz, Lars" <email@hidden>)
 >Re: Inconsistancy Between Do Shell Script and Terminal? (From: Christopher Nebel <email@hidden>)
 >Re: Inconsistancy Between Do Shell Script and Terminal? (From: Bill Briggs <email@hidden>)
 >Re: Inconsistancy Between Do Shell Script and Terminal? (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: Volumes
  • Next by Date: Need suggestion for OS X Unix training in NYC
  • Previous by thread: Re: Inconsistancy Between Do Shell Script and Terminal?
  • Next by thread: Re: Inconsistancy Between Do Shell Script and Terminal?
  • Index(es):
    • Date
    • Thread