Syntax on C shell part 15

remote: [your-program] $ cat “/tmp/quz/‘f 86’” “/tmp/quz/‘f \94’” “/tmp/quz/'f \28'”
remote: [your-program] cat: /tmp/quz/f 86: No such file or directory

cat: /tmp/quz/f 86: No such file or directory
cat: /tmp/quz/f 94: No such file or directory
cat: /tmp/quz/f 28: No such file or directory

Does anyone know what syntax i’m supposed to use here?
It looks like the tester may be broken

@lemek11, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

@andy1li GitHub - lemek11/codecrafters-shell-c

Here is my code.

I’m unsure what the course actually wants from me for this step. specifically for the cat command.
It doesn’t read the first one, but I’m sure it can handle that input from the previous sections.

I think there is a problem with the tester.

Hi @lemek11, Let’s start by reviewing the general rules for single and double quotes:

  1. Single quotes: Treat everything inside as literal, with no special character interpretation.

  2. Double Quotes: Use \ as an escape character to preserve (escape) certain characters such as $, `, ", \, and newline.


Now let’s apply the second rule to the parameters:

  1. /tmp/baz/'f 79'
  • Since there’s no \ inside, everything is treated literally, including 'f 79' around f 79.

  • /tmp/baz/f 79 is incorrect, as those two ' shouldn’t be omitted.


  1. /tmp/baz/'f \66’”
  • Although there’s a \ inside, 6 can’t be escaped by it. So \ is treated literally.

  • Everything else is also treated literally, including ' before f .

  • /tmp/baz/f 66 is incorrect, as neither ' nor \ should be omitted.


  1. /tmp/baz/'f \42\'
  • Despite having two \ inside, neither 4 nor ' can be escaped by them, so both \ are treated literally.

  • Everything else is also treated literally, including the two ' around f \42\.

  • /tmp/baz/f 42 is incorrect, as neither \ nor ' should be omitted.


In summary, everything in the examples above should be preserved exactly as written.

Let me know if you need further clarification!