[BusyBox 0001555]: ash shell functionality lack

bugs at busybox.net bugs at busybox.net
Wed Oct 24 21:55:13 UTC 2007


The following issue has been SUBMITTED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1555 
====================================================================== 
Reported By:                alexsv
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1555
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             10-24-2007 14:55 PDT
Last Modified:              10-24-2007 14:55 PDT
====================================================================== 
Summary:                    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. 
==========================
====================================================================== 

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         
======================================================================




More information about the busybox-cvs mailing list