On 02/08/15 20:30, Linda Walsh wrote:
>>  if [[ $(printf "\n") == $'\n' ]]; then echo T; else echo F; fi
> F

The command substitution operators ($(...) and `...`) strip all trailing
linefeeds. You are left with an empty string here.

The usual workarounds I see (where necessary) are hacks like this:

variable=$(command; echo x); variable=${variable%?x}

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to