I am using Homebrews dash package on MacOS to print a text.

echo "Hello World  - Test"

But I am receiving

Hello World  \- Test

What am I doing wrong?

  • Actually the escaping is also happening in strings in general, I guess: echo "Page 1" | grep "^Page [0-9]" is not working either – trandang Jun 29 '18 at 19:01
  • Cannot reproduce on dash on Linux (just a data point) – Jeff Schaller Jun 29 '18 at 20:09
  • i don't know what the Dash package is, but if I type echo "Hello World - Test" i get just that: Hello World - Test – jmh Jul 18 '18 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.