In this question: How to convert a string to lower case in Bash?
The accepted answer is:
tr:
echo "$a" | tr '[:upper:]' '[:lower:]'
awk:
echo "$a" | awk '{print tolower($0)}'
Neither of these solutions work if $a is -e or -E or -n
Would this be a more appropriate solution:
echo "@$a" | sed 's/^@//' | tr '[:upper:]' '[:lower:]'
Use
printf '%s\n' "$a" | tr '[:upper:]' '[:lower:]'