[Bug 1908025] Re: export var=~root does not expand ~root to /root

2020-12-28 Thread Jilles Tjoelker
I agree that this is a useful feature (including that export a=$b does
not split words and export a=* does not generate pathnames); FreeBSD sh
has had it for a few years:
https://cgit.freebsd.org/src/commit/?id=84fbdd8ca068ec63c6c9a931303d3811738128cb
.

It is specified by https://www.austingroupbugs.net/view.php?id=351
planned for the next major revision of POSIX.1.

** Bug watch added: www.austingroupbugs.net/ #351
   https://www.austingroupbugs.net/view.php?id=351

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1908025

Title:
  export var=~root does not expand ~root to /root

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/1908025/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 932067] Re: Minus associativity not correct in arithmetic expansions

2012-02-17 Thread Jilles Tjoelker
This was fixed between dash 0.5.5 and 0.5.6 by

commit 9655c1ac5646bde1007ecba7c6271d3aa98f294b
Date:   Tue Mar 9 12:52:30 2010 +0800

[ARITH] Fix binary operator parsing

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/932067

Title:
  Minus associativity not correct in arithmetic expansions

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/932067/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 915158] Re: Process is not closing

2012-01-28 Thread Jilles Tjoelker
Catching SIGCHLD in dash does not help in this case, since dash is
already gone (execve'ed) by the time the SIGCHLD would come.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/915158

Title:
  Process is not closing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/915158/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 915158] Re: Process is not closing

2012-01-20 Thread Jilles Tjoelker
You can see the same problem with any shell with a command like

(sleep 3 & exec /bin/sleep 6)

because most versions of /bin/sleep do not clean up zombies (here, a
zombie from an inherited child process).

Dash does not consider the existence of a background process a reason to
fork for an external command (that needs to be execve()'ed). Therefore
you may see zombies if you start some background jobs and the final
command is external and does not clean up zombies it did not start
itself. As a workaround you can add a builtin at the end, for example

(sleep 3 & sleep 6; exit $?)

With bash, this does not happen because bash appears to fork always for
an external command unless it is the only thing to be run in the process
at all. However, this policy results in more process creations than
necessary and therefore poorer performance.

POSIX does not appear to say much about whether the shell should allow
commands to inherit child processes in this manner. However, a shell is
definitely not required to fork as much as bash does.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/915158

Title:
  Process is not closing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/915158/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 880120] Re: read -r does not protect backslashes

2011-10-22 Thread Jilles Tjoelker
*** This bug is a duplicate of bug 259671 ***
https://bugs.launchpad.net/bugs/259671

The backslash escape sequences are being processed by "echo", not
"read". You can avoid this inconsistency by doing something like

printf "%s\n" '000\n999' | dash -c ' read -r f ; printf "%s\n" "$f" '

** This bug has been marked a duplicate of bug 259671
   dash: echo builtin interprets backslash escape sequences

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/880120

Title:
  read -r does not protect backslashes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/880120/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 774447] Re: Dash text input does not get focus

2011-05-16 Thread Jilles Tjoelker
** Also affects: unity
   Importance: Undecided
   Status: New

** Changed in: dash (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/774447

Title:
  Dash text input does not get focus

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 782701] Re: Cant paste commands in the dash

2011-05-16 Thread Jilles Tjoelker
** Also affects: unity
   Importance: Undecided
   Status: New

** Changed in: dash (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/782701

Title:
  Cant paste commands in the dash

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 772899] Re: Can't access applications that minimize to the tray

2011-04-29 Thread Jilles Tjoelker
This applies to the Unity desktop shell, not the /bin/dash shell.

** Also affects: unity
   Importance: Undecided
   Status: New

** Changed in: dash (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/772899

Title:
  Can't access applications that minimize to the tray

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 737105] Re: Dash being open prevents system from blanking screen

2011-04-19 Thread Jilles Tjoelker
This bug is not relevant to the /bin/dash shell (normally /bin/sh is a
link to this).

** Also affects: unity
   Importance: Undecided
   Status: New

** Changed in: dash (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/737105

Title:
  Dash being open prevents system from blanking screen

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 718396] Re: strings not comparable with "<" or ">" as described in man page

2011-02-15 Thread Jilles Tjoelker
You need to quote the operators to distinguish them from redirections.
It may be appropriate to mention this in the man page.

For example:
$ [ 2.6 "<" 2.7 ]; echo $?
0
$ [ 2.6 ">" 2.7 ]; echo $?
1

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/718396

Title:
  strings not comparable with "<" or ">" as described in man page

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 249620] Re: dash does not support multi-digit file descriptors

2010-12-11 Thread Jilles Tjoelker
Upstream seems to have said no fix is planned: http://www.mail-
archive.com/d...@vger.kernel.org/msg00200.html

Furthermore, I have tried this command in various other shells and it
does not work in zsh, ksh93 and mksh either. (ksh93 has a different,
incompatible way to use fds greater than 9.)

Therefore, what should be fixed is the man page of flock. The file
descriptor should be 9, for example.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/249620

Title:
  dash does not support multi-digit file descriptors

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 675185] Re: [Hardy SRU] dash bug causes mysqld_safe to spin at 100% CPU

2010-11-16 Thread Jilles Tjoelker
Be sure to verify that the script works with bash's non-POSIX mode as
well. A not so well known feature of bash is that it enters POSIX mode
when called as "sh". This causes various subtle differences. Therefore,
a #!/bin/sh script with /bin/sh -> bash might behave differently from a
#!/bin/bash script.

-- 
[Hardy SRU] dash bug causes mysqld_safe to spin at 100% CPU
https://bugs.launchpad.net/bugs/675185
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 259671] Re: dash: echo builtin interprets backslash escape sequences

2010-10-15 Thread Jilles Tjoelker
The Debian dash maintainer considers this a WONTFIX:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550399

It seems unlikely that Ubuntu will want to override this.

** Summary changed:

- dash parses backslashes in single quotes
+ dash: echo builtin interprets backslash escape sequences

** Bug watch added: Debian Bug tracker #550399
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550399

-- 
dash: echo builtin interprets backslash escape sequences
https://bugs.launchpad.net/bugs/259671
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 268929] Re: Wrong escape character processing in dash

2010-10-15 Thread Jilles Tjoelker
*** This bug is a duplicate of bug 259671 ***
https://bugs.launchpad.net/bugs/259671

** This bug has been marked a duplicate of bug 259671
   dash: echo builtin interprets backslash escape sequences
 * You can subscribe to bug 259671 by following this link: 
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/259671/+subscribe

-- 
Wrong escape character processing in dash
https://bugs.launchpad.net/bugs/268929
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 313403] Re: Fix /bin/sh

2010-10-15 Thread Jilles Tjoelker
*** This bug is a duplicate of bug 259671 ***
https://bugs.launchpad.net/bugs/259671

** This bug has been marked a duplicate of bug 259671
   dash: echo builtin interprets backslash escape sequences
 * You can subscribe to bug 259671 by following this link: 
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/259671/+subscribe

-- 
Fix /bin/sh
https://bugs.launchpad.net/bugs/313403
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 658838] Re: Cant

2010-10-15 Thread Jilles Tjoelker
*** This bug is a duplicate of bug 422298 ***
https://bugs.launchpad.net/bugs/422298

** This bug has been marked a duplicate of bug 422298
   dash interpreter don't handle some unicode characters correctly
 * You can subscribe to bug 422298 by following this link: 
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/422298/+subscribe

-- 
Cant https://bugs.launchpad.net/bugs/658838
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 598279] Re: read builtin can't handle some synthetic files

2010-09-10 Thread Jilles Tjoelker
** Bug watch added: Debian Bug tracker #595063
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595063

** Also affects: dash (Debian) via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595063
   Importance: Unknown
   Status: Unknown

-- 
read builtin can't handle some synthetic files
https://bugs.launchpad.net/bugs/598279
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 598054] Re: dash: Redirection operator <> should not truncate file

2010-09-03 Thread Jilles Tjoelker
This was fixed in upstream in git commit
09363426739388813a53d63716d15163f6c43caf, March 2010.

-- 
dash: Redirection operator <> should not truncate file
https://bugs.launchpad.net/bugs/598054
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 249620] Re: dash does not support multi-digit file descriptors

2010-08-22 Thread Jilles Tjoelker
You may want this, but allowing only fd 0-9 is not a POSIX violation.
XCU 2.7 Redirection says the maximum fd for redirection is
implementation-defined and must be at least 9. This is sufficient for
most applications.

-- 
dash does not support multi-digit file descriptors
https://bugs.launchpad.net/bugs/249620
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 598279] Re: read builtin can't handle some synthetic files

2010-08-13 Thread Jilles Tjoelker
I consider this a kernel bug, it should be possible to read regular
files one byte at a time (like dash's and zsh's read builtins do).

-- 
read builtin can't handle some synthetic files
https://bugs.launchpad.net/bugs/598279
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 422298] Re: dash interpreter don't handle some unicode characters correctly

2010-05-28 Thread Jilles Tjoelker
This patch has been pushed to dash.git. However, applying it to an older
version of dash could be useful so people can take advantage of this fix
without the possible instability and possible subtle incompatibilities
of a new dash version.

-- 
dash interpreter don't handle some unicode characters correctly
https://bugs.launchpad.net/bugs/422298
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 340571] Re: Bash PPID is wrong when parent terminates

2010-05-18 Thread Jilles Tjoelker
POSIX says PPID should be set once at shell initialization, and I have
not seen a shell which does otherwise.

-- 
Bash PPID is wrong when parent terminates
https://bugs.launchpad.net/bugs/340571
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 268929] Re: Wrong escape character processing in dash

2010-05-16 Thread Jilles Tjoelker
You can avoid these problems by using the printf utility instead of
echo.

-- 
Wrong escape character processing in dash
https://bugs.launchpad.net/bugs/268929
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 356624] Re: `time` crashes in a script

2010-05-15 Thread Jilles Tjoelker
This is because bash's time is a keyword, not a builtin command ('type
time' will show). Therefore it will only be recognized if it is in the
input literally and unquoted.

-- 
`time` crashes in a script
https://bugs.launchpad.net/bugs/356624
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 503761] Re: bash behaves different on symlinks than the GNU tools

2010-05-15 Thread Jilles Tjoelker
This bug should be tightened down to the completion only.

The discrepancy between cd and pwd on one hand and other utilities on
the other hand is inevitable (unless you disable the symlink magic using
set -P).

I consider the fact that /bin/pwd shows the path without symlinks a bug
in GNU coreutils. It lacks the -L and -P options also.

-- 
bash behaves different on symlinks than the GNU tools
https://bugs.launchpad.net/bugs/503761
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 301225] Re: can't define custom exit function

2010-05-15 Thread Jilles Tjoelker
I think the real problem is in gdm here: if it wants to read the user's
shell startup files, it should do so using the user's login shell, not
/bin/sh. User shell startup files cannot be guaranteed to even parse in
/bin/sh, and changing /bin/sh to make it work degrades sh -n for actual
/bin/sh scripts.

As a workaround, use . or eval to pull in the extension-using code if
the extensions are supported.

POSIX does not say whether it is allowed to define a function with the
same name as a special builtin such as exit, but does say that it is
impossible to call such a function. This is a feature as it makes sure
that if something looks like a special builtin (after alias expansion),
it is one. For example, unset cannot be overridden with a function,
which allows using it to remove functions covering all other utilities.

-- 
can't define custom exit function
https://bugs.launchpad.net/bugs/301225
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 548902] Re: shift function does not work as expected.

2010-05-15 Thread Jilles Tjoelker
I think you should just cope with this (by not shifting more than $#),
as there are other shells with the same behaviour.

-- 
shift function does not work as expected.
https://bugs.launchpad.net/bugs/548902
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 239561] Re: Dash remove prefix expansion (${a#b}) doesn't work in double quotes

2010-05-14 Thread Jilles Tjoelker
This has been discussed at the Austin Group (POSIX fixing/development)
recently, but no definitive interpretation has been issued yet. The
current standard is rather vague to allow various implementations to
comply.

I agree that bash's behaviour is better here, but it is possible that
the interpretation will be such that dash's behaviour is also compliant.

In other cases such as echo "${foo+'ab}", I think bash interpreted the
current standard incorrectly (it requires matching quotes, but if you
give "${foo+'ab'}" it does not remove them), while dash has more
sensible behaviour. In both cases, ksh93 (the real Korn shell from AT&T,
probably packaged as "ksh") behaves sensibly, by distinguishing between
+-=? and #% expansions.

Workarounds for this are to put the expansion in a lone assignment (so
it does not need double-quotes around it) or otherwise add indirection
through variables (e.g. q=\' then use $q instead of a single-quote).

-- 
Dash remove prefix expansion (${a#b}) doesn't work in double quotes
https://bugs.launchpad.net/bugs/239561
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 139097] Re: dash 0.5.3-5ubuntu2 variable expansion error using local

2010-05-14 Thread Jilles Tjoelker
"local" will not be removed from dash, as it is used too much, even
though it is not in POSIX.

The underlying problem is related to a feature in bash which also
applies to some POSIX special builtins (export and readonly). This
feature is not in POSIX and strictly speaking conflicts with it.

Dash expands your local y=$x to local y=1 2 3, so three parameters for
local. It fails because "2" is not a valid variable name. Bash does not
perform field splitting and pathname generation on words that look like
assignments, if given as argument to certain builtins such as export,
readonly and local, so that the command does what you want. You can
write local y="$x" to do this in a portable manner. Alternatively, first
make the variable local, and then assign the value.

-- 
dash 0.5.3-5ubuntu2 variable expansion error using local
https://bugs.launchpad.net/bugs/139097
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 509128] Re: Inconsistent output from Bourne Shell "type" command

2010-05-14 Thread Jilles Tjoelker
I don't consider this a bug.

Given you say "Bourne shell", see this session with an original Bourne
shell (Heirloom toolchest jsh, close to Solaris 10 /bin/sh):

$ type ls
ls is /bin/ls
$ type ls
ls is /bin/ls
$ ls /
COPYRIGHT   dev homeproctmp
bin distlib rescue  usr
bootentropy libexec rootvar
cdrom   etc media   sbin
compat  extra0  mnt sys
$ type ls
ls is hashed (/bin/ls)

The output of the type builtin is not fixed as "utility is pathname". It
may show additional information such as whether the command is in the
cache of known utilities (often known as "hash" or "tracked aliases").
This can be useful to know because the shell will not notice a new 'ls'
placed in a directory that precedes /bin in PATH in the above example.

Apparently dash's type builtin may add things to this cache, but the
original Bourne shell's does not.

To get output that can be interpreted with a program, use command -v.
(For completeness, the original Bourne shell does not support this, and
will likely find a /usr/bin/command which is a script interpreted by a
modern shell containing the equivalent of ${0##*/} "$@".)

-- 
Inconsistent output from Bourne Shell "type" command
https://bugs.launchpad.net/bugs/509128
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 259671] Re: dash parses backslashes in single quotes

2010-05-14 Thread Jilles Tjoelker
The issue is not with the single quotes, but with dash's echo builtin.
Apparently, the way they are compiled and configured by default on
Ubuntu, dash's echo builtin interprets backslash escape sequences while
bash's does not.

According to POSIX, this interpretation is permitted; with the XSI
option (following traditional System V), it is required.

Practically, the echo utility can only be used portably if both
backslashes and initial hyphens (which could be interpreted as options)
are omitted. The printf utility is a good substitute.

I don't see much point in changing dash here.

-- 
dash parses backslashes in single quotes
https://bugs.launchpad.net/bugs/259671
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 474638] Re: shell script error if "read -a" is used

2010-05-14 Thread Jilles Tjoelker
Dash deliberately does not support arrays, so this is not a bug in dash.

I suggest changing the #!/bin/sh line at the start of the script to
#!/bin/bash. (Note that bash enters posix mode when it is called as
'sh', so it may be a good idea to add (set -o posix) 2>/dev/null && set
-o posix to the beginning of the script as well.)

If you want to use dash, you have to change the read command to
something like read package_check file_name_installation
file_location_package file_name_package. You also have to change all the
[[ conditional commands ]] to [ builtins ], taking note that [ ] has
somewhat different syntax.

-- 
shell script error if "read -a" is used
https://bugs.launchpad.net/bugs/474638
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs