Skip to main content
3 of 3
The \n isn't the problem, only the \r needs to be removed. There is no need for eval here.
terdon
  • 252.3k
  • 69
  • 480
  • 718

The problem was that this command added a \r before the final \n. It can be removed via:

WINDOWS_USER=$(whoami.exe | tr -d '\r')