I'm trying to debug why echo -e behaves so weirdly on MacOS/Linux that it does not print the trailing '\n'. Is it how echo command works?
SCRIPT
#!/bin/bash -e
myVar='AA\nBB\n\n\n\n\n\n\n\n\n'
echo ">${myVar}<"
myVar="$(echo -e "${myVar}")"
echo ">${myVar}<"
RESULT :
>AA\nBB\n\n\n\n\n\n\n\n\n<
>AA
BB<