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

bugs at busybox.net bugs at busybox.net
Mon Apr 14 21:47:30 UTC 2008


The following issue has been UPDATED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=2924 
====================================================================== 
Reported By:                kiltedknight
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   2924
Category:                   New Features
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             04-14-2008 13:17 PDT
Last Modified:              04-14-2008 14:47 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



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

---------------------------------------------------------------------- 
 vapier - 04-14-08 14:47  
---------------------------------------------------------------------- 
substring's are a bashism ... they are not part of any standard

i dont think we should go adding bashism's to ash 

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         
04-14-08 14:47  vapier         Note Added: 0006634                          
04-14-08 14:47  vapier         Severity                 major => feature    
04-14-08 14:47  vapier         Category                 Standards Compliance =>
New Features
======================================================================




More information about the busybox-cvs mailing list