Learn Bash Scripting by Building Five Programs - Build Five Programs

Tell us what’s happening:

I am trying to get passed the echo -e “\n~~ Questionnaire ~~\n” part of the challenge and it won’t let me pass. Keeps giving me this error: Your script should “echo” the suggested text correctly

I have even checked the hint and copied/pasted it into my code and still won’t pass.

Your code so far

#!/bin/bash

echo -e \n~~ Questionnaire ~~\n

QUESTION1="What's your name?"
QUESTION2="Where are you from?"

echo $QUESTION1
read NAME

echo $QUESTION2
read LOCATION

echo -e "\n~~ Questionnaire ~~\n"

echo Hello $NAME from $LOCATION.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36

Challenge Information:

Learn Bash Scripting by Building Five Programs - Build Five Programs

Step information:

It didn’t print the empty lines. echo will only print empty lines if the value is enclosed in quotes. Place double quotes around the title that gets printed to see if it works.

you can try the Reset button if you believe your code is correct. WARNING: if you click Reset you MUST be patient and wait for the screen to refresh everything. Do NOT rush this process or attempt to touch the code until the Reset is fully done.

Thank you but I’ve tried that already as well as closing the whole Gitpod down and starting over.

please post a screenshot showing the code and expanded hints in coderoad

hmm, you seem to have 2 copies of the same line? One with quotes and one without quotes?

Sorry for delayed response, got busy with my newborn. So I didn’t even notice that, however still not the problem lol.

HI @JasonDKay

Try placing the echo below the shebang.

Happy coding

Thank you. That makes more sense now. Shows before the questions

1 Like

yes when you are instructed to change a line of code, the idea is to change that line without adding a duplicate one somewhere else. So hopefully you’ll keep an eye out for that next time.