Re: Shell script one-liner



On Fri, 6 Mar 2009 20:07:00 +0000
Ian Rawlings <news06@xxxxxxxxxxxxx> wrote:

On 2009-03-06, Tony Houghton <h@xxxxxxxxxxx> wrote:

Yes, but if you're not careful you can have some of your scripts break
when Ubuntu or Debian change the default non-interactive shell to dash,
then again I don't think that's even backwards compatible with vanilla
Bourne, let alone bash (echo -e).

My scripts are for my consumption, I'd never dream of foisting my
rubbish on the rest of the world! Sounds like Ubuntu/Debian are doing
something daft if they do indeed change their shell to an uncommon
one. I'm a gentoo user though, not sure what they're doing.

I think Ubuntu have already done it, which is daft, AFAIK Debian are
thinking of switching over, hopefully not until issues with dash are
fixed. As well as the echo -e problem [1] I've also had another problem
I can't remember properly, something to do with IFS.

[1] (starting with bash):
~ $ echo '\tHello'
\tHello
~ $ echo -e '\tHello'
Hello
~ $ dash
$ echo '\tHello'
Hello
$ echo -e '\tHello'
-e Hello
$

--
TH * http://www.realh.co.uk

.



Relevant Pages

  • Re: Shell script one-liner
    ... when Ubuntu or Debian change the default non-interactive shell to dash, ... let alone bash (echo -e). ...
    (uk.comp.os.linux)
  • openmeetings
    ... I am trying to install openmeetings in ubuntu 09.10, ...
    (Ubuntu)
  • Re: [semi-OT] How to echo \ in dash
    ... In an effort to write my scripts in a posix conform way, ... dash instead of bash. ... Per the POSIX and SUS specifications, the echo command, which maybe be ...
    (Debian-User)
  • how to record a video with sound from a webcam and save it to file
    ... I am using ubuntu 8.10 and vlc version 0.9.4 ... the volume down I hear my voice without echo. ... I still like the cheese interface for newbies like me, ...
    (Ubuntu)
  • Re: [semi-OT] How to echo \ in dash
    ... In an effort to write my scripts in a posix conform way, ... dash instead of bash. ... Per the POSIX and SUS specifications, the echo command, which maybe be built ...
    (Debian-User)