# Issue with parsing echo text (Stage #NI6)

**URL:** <https://forum.codecrafters.io/t/issue-with-parsing-echo-text-stage-ni6/3344>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [December 7, 2024, 8:20pm UTC](https://forum.codecrafters.io/t/issue-with-parsing-echo-text-stage-ni6/3344 "2024-12-07T20:20:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![retop56](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/retop56/32/2910_2.png) [@retop56](https://forum.codecrafters.io/u/retop56)\
**Post date:** [December 7, 2024, 8:20pm UTC](https://forum.codecrafters.io/t/issue-with-parsing-echo-text-stage-ni6/3344/1 "2024-12-07T20:20:46Z")

</div>

I’m stuck on Stage #NI6.

The instructions on the website say the following:

> It’ll then send a series of `echo` commands to your shell:

```auto
$ echo 'shell hello'
shell hello
$ echo 'world test'
world test
$

```

I’ve coded my result to maintain any spaces within quoted text as shown in the stage instructions, however the tester says that my result is wrong:

```auto
[tester::#NI6] Running tests for Stage #NI6 (Quoting - Single quotes)
[tester::#NI6] Running ./your_program.sh
[your-program] $
[tester::#NI6] > echo 'example shell'
[your-program] example shell
[tester::#NI6] ✓ Received expected response
[your-program] $
[tester::#NI6] > echo shell script
[your-program] shell script
[tester::#NI6] Expected: "shell script"
[tester::#NI6] Received: "shell script"
[your-program] $
[tester::#NI6] Received output does not match expectation.
[tester::#NI6] Test failed

```

I’d appreciate some assistance to figure out where I’m going wrong.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [December 8, 2024, 10:00am UTC](https://forum.codecrafters.io/t/issue-with-parsing-echo-text-stage-ni6/3344/5 "2024-12-08T10:00:40Z")

</div>

Hi @retop56, `echo shell script` doesn’t use any quotes, so the multiple spaces are not preserved and treated as a single space.

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/f/f440a37f143f0fef5a6f1eb9e3be5c43bf1eb556.png)

TBH, I found it a bit confusing at first too!

---

<div class="post-metadata">

**Author:** ![retop56](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/retop56/32/2910_2.png) [@retop56](https://forum.codecrafters.io/u/retop56)\
**Post date:** [December 8, 2024, 2:16pm UTC](https://forum.codecrafters.io/t/issue-with-parsing-echo-text-stage-ni6/3344/6 "2024-12-08T14:16:23Z")

</div>

I was able to pass the stage because of your help. Thank you, not just for this, but for everything else you do as well! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [December 15, 2024, 2:33pm UTC](https://forum.codecrafters.io/t/issue-with-parsing-echo-text-stage-ni6/3344/7 "2024-12-15T14:33:22Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
