[BusyBox 0002924]: ash does not parse "${varname:begin:end}" for substring creation/checking

bugs at busybox.net bugs at busybox.net
Mon Apr 14 20:17:36 UTC 2008


The following issue has been SUBMITTED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=2924 
====================================================================== 
Reported By:                kiltedknight
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   2924
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             04-14-2008 13:17 PDT
Last Modified:              04-14-2008 13:17 PDT
====================================================================== 
Summary:                    ash does not parse "${varname:begin:end}" for
substring creation/checking
Description: 
The shell construct:

${varname:begin:end} does not produce the substring of $varname starting
at begin and going to end.

example:

#!/bin/ash

mystr="This is a string"
echo $mystr
mysubstr=${mystr:0:4}
echo $mysubstr
#end of example

Expected output:
This is a string
This

Actual output:
This is a string
./testscript: line 5: syntax error: Bad substitution



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

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-14-08 13:17  kiltedknight   New Issue                                    
04-14-08 13:17  kiltedknight   Status                   new => assigned     
04-14-08 13:17  kiltedknight   Assigned To               => BusyBox         
======================================================================




More information about the busybox-cvs mailing list