[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    two small bugs in the shell
From:       Trek <trek00 () inbox ! ru>
Date:       2016-01-20 22:33:47
Message-ID: 20160120233347.056496a3 () enterprise
[Download RAW message or body]

the first bug I found is in the substring processing

with a posix shell:

 $ sh -c 's=OK\\n; echo "${s%%\\n*}"'
 OK

but with busybox:

 $ busybox sh -c 's=OK\\n; echo "${s%%\\n*}"'
 OK\

the other expansions %, # and ## are affected too


the second one is related to the \c escape sequence

with a posix shell:

  $ sh -c 'printf %b OK\\c'
  OK

with busybox:

  $ busybox sh -c 'printf %b OK\\c'
  OK\c

and the same applies to echo


I'm using the version 1.22.0-9 included in Debian GNU/Linux 8 (jessie)

c-ya!

----
small ad: I discovered this bug developing a small shell library that
you can find at http://www.trek.eu.org/devel/naive/naive-0.0.2.tar.gz
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic