[Bug 10901] New: Shell parameter expansion not working for /
bugzilla at busybox.net
bugzilla at busybox.net
Thu Mar 29 11:14:21 UTC 2018
https://bugs.busybox.net/show_bug.cgi?id=10901
Bug ID: 10901
Summary: Shell parameter expansion not working for /
Product: Busybox
Version: 1.27.x
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: camabeh at gmail.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
Hello, I am trying to escape varaible which will be used in `sed` command but
unfortunately it looks like there is some bug in handling parameter expansion
in busybox shell.
Expected:
> Bash in Ubuntu:
```sh
$ var="/Users/Documents/name/file"; echo "${var//\//\\/}"
\/Users\/Documents\/name\/file
```
Actual:
> Shell in Alpine:
```sh
$ var="/Users/Documents/name/file"; echo "${var//\//\\/}"
/Users/Documents/name/file
```
It's wierd because parameter expansion with replacement is working for other
characters.
> Bash in Ubuntu:
```sh
$ var="/Users/Documents/name/file"; echo "${var//e/E}"
/UsErs/DocumEnts/namE/filE
```
> Shell in Alpine:
```sh
$ var="/Users/Documents/name/file"; echo "${var//e/E}"
/UsErs/DocumEnts/namE/filE
```
Env:
BusyBox v1.27.2 (2017-11-28 16:17:30 GMT) multi-call binary.
Alpine 3.7
Ref:
https://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameter-Expansion
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list