|
From: | Linda Walsh |
Subject: | BUG?: (or what's going on?) test for NL == NL fails (bash-4.3.39(3)-release) |
Date: | Sun, 02 Aug 2015 12:30:00 -0700 |
User-agent: | Thunderbird |
printf "\n" |hexdump -C
00000000 0a
printf "%s" $'\n'|hexdump -C
00000000 0a
if [[ $(printf "\n") == $'\n' ]]; then echo T; else echo F; fi
F ---- just noticed the problem doesn't happen if I try to use '\t' (tab)
printf "\t" |hexdump -C
00000000 09
printf "%s" $'\t'|hexdump -C
00000000 09
if [[ $(printf "\t") == $'\t' ]]; then echo T; else echo F; fi
T
[Prev in Thread] | Current Thread | [Next in Thread] |