BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001555 [BusyBox] Standards Compliance major always 10-24-07 14:55 02-13-08 07:52
Reporter alexsv View Status public  
Assigned To BusyBox
Priority normal Resolution no change required  
Status closed   Product Version svn
Summary 0001555: ash shell functionality lack
Description ash shell from busybox 1.7.2 does not support the following constructions:
CR=$'\r'

for example the following script
----cut----
#!/bin/sh
CR=$'\r'
echo $CR
----cut----
will produce string "$\r" on display
that's violation of standard (citation from man page http://www.gnu.org/software/bash/manual/bashref.html): [^]
==========================
 3.1.2.4 ANSI-C Quoting

Words of the form $'string' are treated specially. The word expands to string, with backslash-escaped characters replaced as specified by the ANSI C standard. Backslash escape sequences, if present, are decoded as follows:

\a
    alert (bell)
\b
    backspace
\e
    an escape character (not ANSI C)
\f
    form feed
\n
    newline
\r
    carriage return
\t
    horizontal tab
\v
    vertical tab
\\
    backslash
\'
    single quote
\nnn
    the eight-bit character whose value is the octal value nnn (one to three digits)
\xHH
    the eight-bit character whose value is the hexadecimal value HH (one or two hex digits)
\cx
    a control-x character

The expanded result is single-quoted, as if the dollar sign had not been present.
==========================
Additional Information
Attached Files

- Relationships

- Notes
(0002889)
pipatron
11-04-07 17:38

This sounds like a bashism. The relevant documentation for shell standards should be this:

http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html [^]
 
(0004424)
vda
02-13-08 07:52

Not a bug. Although I'd be happy to receive a patch which adds this (and other) nice bashisms, with CONFIG_ASH_BASHISMS :)
 

- Issue History
Date Modified Username Field Change
10-24-07 14:55 alexsv New Issue
10-24-07 14:55 alexsv Status new => assigned
10-24-07 14:55 alexsv Assigned To  => BusyBox
11-04-07 17:38 pipatron Note Added: 0002889
02-13-08 07:52 vda Status assigned => closed
02-13-08 07:52 vda Note Added: 0004424
02-13-08 07:52 vda Resolution open => no change required


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker