PREV INDEX NEXT

Author: Unknown
Subject: How to deal with backslash?
Date: Wednesday, 19 Feb 2020, 19:18:59

I'm confused about how should we deal with backslash. The output of "echo a | /c/cs223/Hwk3/strwrs -q \a ab" and "echo a | /c/cs223/Hwk3/strwrs -q /a ab" are both ab. So my interpretation is backslash works similarly with forward slash by escaping the following character. 

However, the output of "echo + | /c/cs223/Hwk3/strwrs -q /+ ab" is ab but the output of "echo + | /c/cs223/Hwk3/strwrs -q \+ ab" is ab+. I understand the "/+" case but I don't know how to interpret the output from "\+" case. Thank you.
PREV INDEX NEXT