Flow Control, Lab: For Loops - Step 2

Problem statement:

Let us now update the script /home/bob/launch-rockets.sh to read mission names from a file. Mission names are located at /tmp/assets/mission-names.txt

Issue Faced:

Two issues apparent, the first being that clicking “check” to verify my solution results in wait times of many minutes before the system gives me back a “incorrect” or “correct” result of my solution check - the second issue is that copy/paste of the solution into a fresh launch-rockets.sh script file provided results in the error below.

Incorrect:
#The script does not print all values from 31 to 40

The error doesn’t specify which script exactly, I assume its launch-rockets.sh as it wouldn’t make sense for the lab to mangle a script when it starts the lab… but it would help if I knew which script the lab was having problems with. The strange part is that the missions.txt file only has 35 names in it, so the error makes even less sense now.

Here is my launch-rockets.sh script:

for mission_name in $(cat /tmp/assets/mission-names.txt)
do
    bash /home/bob/create-and-launch-rocket $mission_name
done

Here is the file generated by the lab for mission-names.txt :

ACE
AIM
Analog
Apollo
Apollo-Soyuz
Aqua
Aquarius
ARCTAS
ASTRO-1
ASTRO-2
Astro-E2
ATTREX
Aura
DART
Dawn
Deep
DISCOVER-AQ
Dragonfly
GALEX
Galileo
Gemini
Genesis
Geotail
GLAST
Glory
GOES
GRAIL
Gravity
Herschel
HETE-2
Heliophysics
Hinode
Hitomi
Hubble
Hurricanes

Hey James, it works for me. Try to refresh and get back into the lab.
It’s true that the mission-names.txt is unnecessary long (35 entries if I recall correctly) and takes a long time to process…
My bad it’s for step 1! :laughing:

but I’m running into an error for step 3 I don’t understand why…