|
|
|
10.5: Fix the echo -n problem in 10.5
This is a feature, not a bug. For all we know, there may very well be some old BSD cruft that depends on It's surprising that this fix even works since http://www.gnu.org/software/bash/manual/bashref.html#SEC85
10.5: Fix the echo -n problem in 10.5
The bash man page I consulted said that invoking it as sh emulates sh start up behaviour (i.e. ignores .bash_profile and .bashrc) but it does not state anywhere that builtin commands will revert to sh behaviour.
In fact, I tried echo -n from bash and sh on my 10.4 system and my Linux system and in all cases, the -n was recognised as a switch. On both of those machines, /bin/sh and /bin/bash were identical (in fact, on the Linux box, /bin/sh was a symlink). It looks to me like Apple have compiled bash with a patch to produce sh on 10.5. It may be that the patch only disables the echo -n switch, but it may be that it alters the behaviour of sh in other ways in order to be Unix compliant. For this reason, I'd say it is quite dangerous to replace /bin/sh with /bin/bash, random shell scripts might break as a result. In fact, I'd agree with the opinion expressed earlier that the 10.5 behaviour amounts to a bug fix. |
SearchFrom our Sponsor...What's New:Hints4 new Hints in the last 24 hoursComments last 2 days
Links last 2 weeksNo recent new linksWhat's New in the Forums?
The Editor's Corner...Here are some of my (robg) other projects...
Hints by TopicNews from Macworld
The macosxhints PollWhat version of OS X are you running as your main OS?
Other polls | 11,329 votes | 42 comments
|
|
Copyright © 2009 Mac Publishing LLC (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Powered by Geeklog Created this page in 0.03 seconds |
|