The following outputs BUG in ash:

case "\z" in
"\z" )  echo ok ;;
* )     echo BUG ;;

Apparently `case` has trouble matching the "\z" pattern due to the
backslash within the double quotes. Quoting it in any other way works.

Also, backslash-escaping the backslash within the double quotes is a
workaround. But this is not supposed to be necessary unless the
backslash precedes one of the special characters $, `, ", \, or <newline>.

The bug is in 1.28.0 but not 1.27.0.

According to my testing, this bug appears to have been introduced by
this commit, which fixed another related bug.

| commit fda9fafe279d9394ad53313320a949c86f646734

| Author: Denys Vlasenko <>
| Date:   Wed Jul 5 19:10:21 2017 +0200

|     ash: fix matching of unicode greek letter rho (cf 81) and similar

|     Signed-off-by: Denys Vlasenko <>


- M.
busybox mailing list

Reply via email to