Modify

Opened 18 months ago

#23070 new defect

Pattern replacement bug in busybox/sh (a slash cannot be escaped)

Reported by: emusic Owned by: developers
Priority: normal Milestone:
Component: packages Version: Chaos Calmer 15.05
Keywords: busybox pattern replace slash Cc:

Description

In busybox prior to 1.25 (or maybe to 1.24), slash cannot be escaped in ${var/old/new} substitution.

For example:

VAR1="/home/user"
VAR2=${VAR1/home\/user/root}
echo $VAR2

produces:

/user/root/user

The "[\/]" form does not work too.

In 1.25, slash is recognized as expected.

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.