|
From: | Martijn Dekker |
Subject: | another case from the case corner case casualty case files |
Date: | Mon, 3 Apr 2017 02:34:13 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
$ x=$'\\a\\b\\c\\\001\\d\\e\\f' $ case $'abc\001def' in $x) echo ok ;; *) echo oops; esac oops $ x=$'\\a\\b\\c\\\002\\d\\e\\f' $ case $'abc\002def' in $x) echo ok ;; *) echo oops; esac ok 'case' can't match an escaped $'\001' character passed from a variable. Any other character from $'\002' up works fine. Curious that $'\001' seems to be handled specially somehow. - M
[Prev in Thread] | Current Thread | [Next in Thread] |