Re: GOTCHA in !Ubuntu - broken assumption
It had never occurred to me THAT A DISTRO COULD DO SOMETHING AS DANGEROUSLY REGRESSIVE as change the default shell to something not backward compatible. In practicality, I feel your pain. But my preference is for Linux to be standards-based (POSIX in this case) rather than implementation- based (such as bash or MS Windows). So I see the argument for accepting dash as a POSIX-compliant baseline, and the hope that the reasoning will take hold more broadly. And I'm impressed that they've stood firm. As a developer, I have considered it a bit sloppy to write bash scripts with #!/bin/sh assuming that bash will always be the default. But again, it's a pain to come across this kind of breakage, even if it's motivated by longer term considerations. Nigel ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: GOTCHA in Ubuntu - broken shell [FLAMEBAIT]
Bill Sconce wrote: Arrogant. Unbelievable. The side effects were reported during beta and still the developers did this. Clearly, they made a decision, and you (and a number of others) just don't like like it. The developer's justification appears to be because I think its best this way (My observation is conscientious developers would have stated their reasons and let it get hashed out in the various forums.) On the other hand, they may be trying to force application developers to fix their mistakes - this invariable turns out about as successful as forcing Unix programmers to not use null-terminated strings. Linux philosophy says you have a choice of another distribution. Open Market philosophy says you can use another product (for the most part: Windows, Apple, or BSD). Welcome to Open Source, where its the developers fault instead of some nebulous company that hides behind lawyers. --Bruce ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: GOTCHA in Ubuntu - broken shell
On 9/28/07, Bill Sconce [EMAIL PROTECTED] wrote: (And remember to not trust Ubuntu. They don't think things through to the consequences. They don't listen, either. See below.) How about the consequences of using the syntax of one language and asking the shell/interpreter/compiler of a different one to run it? Bill, I have to disagree with you on this one. If you say '/bin/sh' then you should speak '/bin/sh'. If you say '/usr/bin/python' then you should speak '/usr/bin/python'. If you are speaking '/bin/bash', then you should say, '/bin/bash'. Don't use bash syntax in a script that is configured to be run by /bin/sh. of course, if dash is failing on correct sh syntax, then Ubuntu screwed up and the above comments don't apply. Cheers! Ty -- Tyson D Sawyer I prefer dangerous freedom over peaceful slavery. -- Thomas Jefferson ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: GOTCHA in Ubuntu - broken shell
On Friday, Sep 28th 2007 at 14:53 -, quoth Bill Sconce: =___ =Another example. This one is [was] my favorite; I think it was =the first one to bork on me. The error message was [is] so obscure =that for the past year I've lived with band-aiding each if =statement one at a time, just to have something which works. =(One uses if statements much more frequently than slicing.) =In bash: = $ if [ ${breakfast} == spamandeggs ]; then = echo yummy = fi = yummy = $ =In dash: = $ if [ ${breakfast} == spamandeggs ]; then = echo yummy = fi = [: 11: ==: unexpected operator = $ = =How ugly and unhelpful is that? = =The band-aid, by the way, was that = instead of == works. =(And how ugly is THAT? And how do you explain that to a student?) FYI, the correct operator is = and == is an extension of bash. == should not be used. -- Time flies like the wind. Fruit flies like a banana. Stranger things have .0. happened but none stranger than this. Does your driver's license say Organ ..0 Donor?Black holes are where God divided by zero. Listen to me! We are all- 000 individuals! What if this weren't a hypothetical question? steveo at syslang.net ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: GOTCHA in Ubuntu - broken shell
Ben Scott wrote: Personally, I think the right thing to do is make bash the de facto standard on all *nix systems. We don't need this kind of headache. But others obviously disagree. Entropy wins again. But then, it always does. Always? Man, there ought to be a law :) -- Ted Roche Ted Roche Associates, LLC http://www.tedroche.com ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: GOTCHA in Ubuntu - broken shell
Ben Scott wrote: On 9/29/07, Tyson Sawyer [EMAIL PROTECTED] wrote: If you say '/bin/sh' then you should speak '/bin/sh'. If you are speaking '/bin/bash', then you should say, '/bin/bash'. It gets ugly in the other direction, too, BTW. Some people fall the habit of just putting #!/bin/bash at the top of every shell script they write, even those that do not use bash-specific features. If those shell scripts then go to a system which has *a* Bourne-like shell but not bash, they fail, because bash isn't available, even though another shell (which would have worked) is. And then we can get into extension which are present in multiple shells (say, bash and zsh) but not a basic, POSIX-compliant, Bourne-like shell. What do you do *then*? It gets even worse still... Bash changes to posix mode when invoked as /bin/sh. This means that there is at least a possibility that you've used something in the gray area between bash's posix implementation and what would work if you invoked the shell as bash. The problem is that the standard defines a range of acceptable implementations, and any shell that falls in that range is a posix shell. I am not familiar with dash, but I would be quite surprised if even dash implemented only that part of the language that was *required* to be implemented in all posix shells, with the most restrictive limits in all cases where posix specified a choice. This means that even if you doctor all your scripts to work with both bash and dash, there is no guarantee that the next implementation that comes along won't break something else. This is why, from a user's point of view, I've always liked the bash philosophy of including syntax from historical implementations so that users don't *have* to retrain themselves. The compiler folks faced this problem years ago, by providing an option (ok, *lots* of options) to bitch when a program uses a construct that, while conforming to the language definition, is not required to be present in every implementation of the language. Maybe it is time for something like this in the shell too, or a lint version of the shell, perhaps. Meanwhile, I agree with the sentiment that bash (one version or another) should be the standard shell on Linux distros and I am disappointed that Ubuntu (or *any* major Linux distro) thinks so little of their users as to stick with this decision. It ends up reflecting poorly on the Linux community as a whole. Fran ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: GOTCHA in Ubuntu - broken shell
On 9/29/07, Tyson Sawyer [EMAIL PROTECTED] wrote: If you say '/bin/sh' then you should speak '/bin/sh'. If you are speaking '/bin/bash', then you should say, '/bin/bash'. It gets ugly in the other direction, too, BTW. Some people fall the habit of just putting #!/bin/bash at the top of every shell script they write, even those that do not use bash-specific features. If those shell scripts then go to a system which has *a* Bourne-like shell but not bash, they fail, because bash isn't available, even though another shell (which would have worked) is. And then we can get into extension which are present in multiple shells (say, bash and zsh) but not a basic, POSIX-compliant, Bourne-like shell. What do you do *then*? Personally, I think the right thing to do is make bash the de facto standard on all *nix systems. We don't need this kind of headache. But others obviously disagree. Entropy wins again. But then, it always does. -- Ben ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/