[ale] changing dash to bash in ubuntu

Lightner, Jeff jlightner at water.com
Mon Feb 21 09:06:37 EST 2011


A couple of notes on the thread:

Issues with /bin/sh being linked to things other than bash aren't new -
I've seen them discussed on other forums for more than a yar.

One poster talked about "sh" in a way that led me to believe he was
discussing the original Bourne Shell.   The POSIX shell (which is sh in
say HP-UX) is more like Korn Shell (ksh).

Another poster talked about pdksh - that was an abomination that didn't
really do things quite the way ksh did.   Linux now has ksh available
for those of old farts that knew and liked ksh.   (For RHEL users you
could get ksh instead of pdksh as of RHEL5 from the repositories.)

I agree with others though - If you design something in a specific shell
make your interpreter line specific to that shell:  #!/bin/bash,
#!/bin/ksh, or even #!/bin/sh if it is on a system that has that as a
native POSIX shell.   If you're writing it for portability you might
want to put tests in that help to verify what shell it is actually using
and note there are differences sometimes from version to version.
Things I wrote using #!/bin/ksh when it was pdksh had some minor issues
when it was real ksh.



-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
Brian Pitts
Sent: Sunday, February 20, 2011 3:11 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] changing dash to bash in ubuntu

On 02/18/2011 09:46 PM, James Sumners wrote:
> The problem
> is that they claim dash to be a POSIX shell, but when people report
> bugs[1] in dash they get written off as "not a POSIX bug" when in fact
> they are..

That's pretty much the opposite of what I take away from that link.
Colin Watson's comment seems pretty clear-

> As far as non-POSIX constructs go, Paul Smith is right on the money
with his comments in
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/141481/comments/4, I
think. The proper analogy is a C compiler: it is not a bug in the C
compiler if it stops accepting code that doesn't conform to the standard
and doesn't declare that it uses an extension (in this case, by saying
#! /bin/bash). This is of course not to say that the real dash bugs that
have been identified here should not be fixed.

If you look at the individual bugs linked to from bug #141481, the cases
where dash was failing to conform to POSIX have been fixed in dash; i.e.

https://bugs.launchpad.net/ubuntu/+source/dash/+bug/92189
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/105634

-- 
All the best,
Brian Pitts
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
 
Proud partner. Susan G. Komen for the Cure.
 
Please consider our environment before printing this e-mail or attachments.
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------



More information about the Ale mailing list