[BusyBox 0001046]: ash does not handle quotes propperly (aka like /bin/sh)

bugs at busybox.net bugs at busybox.net
Thu Feb 14 16:24:05 UTC 2008


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1046 
====================================================================== 
Reported By:                walter
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1046
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             09-24-2006 05:46 PDT
Last Modified:              02-14-2008 08:24 PST
====================================================================== 
Summary:                    ash does not handle quotes propperly (aka like
/bin/sh)
Description: 
The following tests are part of the bash-test suite posix2. the bb ash
passed all other posix2 tests.


SQUOTE="'"
val1=$(set | sed -n 's:^SQUOTE=::p')
if [ "$val1" != "''\\'''" ]; then 
        echo testfail "variable quoting 1"
fi


VHASH=ab#cd
val1=$(set | sed -n 's:^VHASH=::p')
if [ "$val1" != "ab#cd" ]; then
        echo testfail "variable quoting 3"
fi



====================================================================== 

---------------------------------------------------------------------- 
 vda - 02-14-08 08:24  
---------------------------------------------------------------------- 
Basically, when variable contains a value which is just one single quote,
set builtin shows it as:

bash: SQUOTE=''\'''
ash:  SQUOTE=''"'"

Both seem to be ok. I don't see where ash violates SUSv3:

SYNOPSIS
    [XSI] set [-abCefmnuvx][-h][-o option][argument...]
    [XSI] set [+abCefmnuvx][+h][+o option][argument...]
    set -- [argument...]
    set -o
    set +o
DESCRIPTION
If no options or arguments are specified, set shall write the names and
values of all shell variables in the collation sequence of the current
locale. Each name shall start on a separate line, using the format:

    "%s=%s\n", <name>, <value>

The value string shall be written with appropriate quoting; see the
description of shell quoting in Quoting. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-24-06 05:46  walter         New Issue                                    
09-24-06 05:46  walter         Status                   new => assigned     
09-24-06 05:46  walter         Assigned To               => BusyBox         
02-14-08 08:24  vda            Note Added: 0004694                          
======================================================================




More information about the busybox-cvs mailing list