{ "id": "freeCodeCamp/learn-nano-by-building-a-castle:v1.0.0", "version": "2.0.0", "summary": { "title": "Learn Nano by Building a Castle", "description": "> Welcome to the Nano lessons!" }, "config": { "setup": { "commands": [ "./.freeCodeCamp/setup.sh", "cd .freeCodeCamp && npm install" ], "commits": [ "3a0761685061ad05e1e6f8ae09dd2389122d21fb" ] }, "testRunner": { "command": "npm run programmatic-test", "args": { "tap": "--reporter=mocha-tap-reporter" }, "directory": ".freeCodeCamp" }, "repo": { "uri": "https://github.com/freeCodeCamp/learn-nano-by-building-a-castle", "branch": "v2.0.0" }, "continue": { "commands": [ "bash ./.freeCodeCamp/setup.sh", "bash ./.freeCodeCamp/reset.sh" ] }, "reset": { "commands": [ "bash ./.freeCodeCamp/setup.sh", "bash ./.freeCodeCamp/reset.sh" ] }, "dependencies": [ { "name": "node", "version": ">=10" } ], "webhook": { "url": "https://api.freecodecamp.org/coderoad-challenge-completed", "events": { "init": false, "reset": false, "step_complete": false, "level_complete": false, "tutorial_complete": true } } }, "levels": [ { "id": "10", "title": "Start the Terminal", "summary": "", "content": "", "steps": [ { "id": "10.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "f8b057618352a971512c9bb4d4eee081ba4a97ff" ] }, "content": "**The first thing you need to do is start the terminal.** Do that by clicking the \"hamburger\" menu at the top left of the screen, going to the \"terminal\" section, and clicking \"new terminal\". Once you open a new one, type `echo hello nano` into the terminal and press enter.", "hints": [ "Capitalization matters", "Make sure you are in the `project` folder when you enter the command", "If the tests don't run automatically, try typing `exit` into the terminal and redoing the instructions" ] } ] }, { "id": "20", "title": "Touch `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "20.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "e6a7df3d12ad2026a7dbf338bc2c70aae783e16b" ] }, "content": "Use `touch` to create a file named `castle.sh` in the `project` folder.", "hints": [ "Use the touch command to create the file", "Make sure you are in the `project` folder when you enter the command", "Try entering `touch castle.sh` in the terminal", "Enter `cd ~/project` to get to the project folder if you aren't there" ] } ] }, { "id": "25", "title": "List contents", "summary": "", "content": "", "steps": [ { "id": "25.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "3d990df711f0f5aae07a7b3c4b08998e71a3c057" ] }, "content": "Use the list (`ls`) command to make sure your file is there.", "hints": [ "Type `ls` into the terminal and press enter", "Make sure you are in the `project` folder when you enter the command", "Enter `cd ~/project` to get to the project folder if you aren't there" ] } ] }, { "id": "30", "title": "Nano `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "30.1", "setup": { "watchers": [ "./.freeCodeCamp/test/.next_command" ], "commits": [ "e88d7582d4738abe42e1fd4a0b130f440dffe41b" ] }, "content": "There it is. Nano is a program for editing files that runs in the terminal. You can open a file with `nano filename`. Open the `castle.sh` file you created with Nano.", "hints": [ "Type `nano castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "You can exit nano by pressing `control + x` if you opened the wrong file" ] } ] }, { "id": "40", "title": "Write out `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "40.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "3db0d7565d6d9210733e047fa60ca516b427f098" ] }, "content": "The terminal is showing your file in Nano. At the bottom are the commands you can use. Your file is empty right now. Add `echo hello nano` at the top and press `control + o` to \"write-out\", or save, the file. You will be prompted at the bottom for a filename. Leave it as `castle.sh` and press enter to save the file.", "hints": [ "Put `echo hello nano` at the top of the file, then press `control + o`, then `enter` to save the file", "Make sure the file was saved as `castle.sh`", "If you are trying to reset, exit nano first" ] } ] }, { "id": "50", "title": "Exit", "summary": "", "content": "", "steps": [ { "id": "50.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "f04c07c145e0d7a8f47a3ed43320ac33516475fa" ] }, "content": "Exit Nano by pressing `control + x`.", "hints": [ "Use `control + x` to exit nano", "Make sure you are in the `castle.sh` file before you exit", "Open the file with `nano castle.sh` if you need to open it first", "If you are trying to reset, exit nano first" ] } ] }, { "id": "60", "title": "Run `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "60.1", "setup": { "commands": [ "bash ./.freeCodeCamp/reset.sh" ], "watchers": [ "../.bash_history" ], "commits": [ "68df3d72f748d42076041b304fec35636d998875" ] }, "content": "This will be a small bash script. You can run it with `bash filename`. Run your `castle.sh` file in the terminal.", "hints": [ "Type `bash castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "70", "title": "Nano `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "70.1", "setup": { "watchers": [ "./.freeCodeCamp/test/.next_command" ], "commits": [ "f085f36593c3a91e3ecf15fde067ac111e83e988" ] }, "content": "You can see the command in your file ran and output text into the terminal. Open your file again with nano.", "hints": [ "Type `nano castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "80", "title": "Delete `echo hello nano`", "summary": "", "content": "", "steps": [ { "id": "80.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "0f709c51084fa318cd2fb219a0df552a612a3e56" ] }, "content": "You can \"cut\" text with `control + k`. Move the cursor to the line with your text and remove the whole line. When you are done, save the file with `control + o`. Note that you cannot use a mouse to move your cursor.", "hints": [ "Remove the `echo hello nano` line of text and save the file", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first" ] } ] }, { "id": "90", "title": "Add `echo \"\"`", "summary": "", "content": "", "steps": [ { "id": "90.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "611779cb2f81a09863d1fc5a7bb1730328706ac7" ] }, "content": "You are going to draw a castle that you can print to the terminal. Add `echo \"\"` to your file. Put an empty line in between the two quotes like this:\n\n```\necho \"\n\n\"\n```\n\nWhen you are done, save the file with `control + o`.", "hints": [ "Your file should match the example", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first" ] } ] }, { "id": "100", "title": "Add the bottom row to castle", "summary": "", "content": "", "steps": [ { "id": "100.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "2e712712edb044a760ed842fe83b2cd777d0af5a" ] }, "content": "You will draw the castle between the quotes. Add ground level by putting 20 underscores (`_`) in the row between the quotes. It should look like this:\n\n```\necho \"\n____________________\n\"\n```\n\nSave the file with `control + o` when you are done.", "hints": [ "Your file should match the example", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first" ] } ] }, { "id": "110", "title": "Exit", "summary": "", "content": "", "steps": [ { "id": "110.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "442d7989cdf4cfe27918b2b8ddd0cfbe170d8228" ] }, "content": "The `^` in front of all the commands at the bottom means to press `control` and the letter to run the command. Exit Nano with the `Exit` command.", "hints": [ "Use `control + x` to exit nano", "Make sure you are in the `castle.sh` file before you exit", "Open the file with `nano castle.sh` if you need to open it first", "If you are trying to reset, exit nano first" ] } ] }, { "id": "120", "title": "Run `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "120.1", "setup": { "commands": [ "bash ./.freeCodeCamp/reset.sh" ], "watchers": [ "../.bash_history" ], "commits": [ "d08da3bcfea0cf0ea60844a3113900262dac59e0" ] }, "content": "Use the `bash` command to run your `castle.sh` file in the terminal again.", "hints": [ "Type `bash castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "130", "title": "Nano `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "130.1", "setup": { "watchers": [ "./.freeCodeCamp/test/.next_command" ], "commits": [ "3c550d45d8ee76c0523968449401c9c904bdbc18" ] }, "content": "Looks like it's working. Open your file with Nano.", "hints": [ "Type `nano castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "140", "title": "Add the bottom row sides", "summary": "", "content": "", "steps": [ { "id": "140.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "5d1401915ab320c7386006e8a868fcc5c072d1fb" ] }, "content": "Add a vertical bar, or pipe (`|`), at each end of your ground level. It should look like this:\n\n```\n|____________________|\n```\n\nSave the file when you are done.", "hints": [ "Don't change the other rows", "Your castle should match the example", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first", "The whole file should look like this:\n```sh\necho \"\n|____________________|\n\"\n```" ] } ] }, { "id": "150", "title": "Add second row", "summary": "", "content": "", "steps": [ { "id": "150.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "ab1c024c26a10a669d83f48d4e47d0844272167e" ] }, "content": "Add another story to your castle above the ground level that has two more vertical bars. Each bar should be above your existing bars so you need spaces in between them. It should look like this:\n\n```\n| |\n|____________________|\n```\n\nWhen you are done, save the file.", "hints": [ "Don't change the other rows", "Your castle should match the example", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first", "The whole file should look like this:\n```sh\necho \"", "|\n|____________________|\n\"\n```" ] } ] }, { "id": "160", "title": "Exit", "summary": "", "content": "", "steps": [ { "id": "160.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "15a19e57ec35f74956ccef77f24a764649ea0982" ] }, "content": "Exit Nano so you can run the script again.", "hints": [ "Use `control + x` to exit nano", "Make sure you are in the `castle.sh` file before you exit", "Open the file with `nano castle.sh` if you need to open it first", "If you are trying to reset, exit nano first" ] } ] }, { "id": "170", "title": "Run `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "170.1", "setup": { "commands": [ "bash ./.freeCodeCamp/reset.sh" ], "watchers": [ "../.bash_history" ], "commits": [ "f58cd29d9aedc46a60d9b7db875d592a32f76aa0" ] }, "content": "Run your file again to see the progress.", "hints": [ "Type `bash castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "180", "title": "Nano `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "180.1", "setup": { "watchers": [ "./.freeCodeCamp/test/.next_command" ], "commits": [ "f848becd5a93db67626624106e91394f2a24b9c8" ] }, "content": "Open your file again so you can add some more.", "hints": [ "Use Nano to open the file", "Type `nano castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "190", "title": "Add the sides of the castle", "summary": "", "content": "", "steps": [ { "id": "190.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "e677f451762487f9486e2951dac6f422172d4701" ] }, "content": "You can use `control + k` to \"cut\" and `control + u` to \"uncut\", or paste, a line. Add five more rows like the one you just added to make your castle six stories high. Try to use the cut and paste method. It should look like this:\n\n```\n| |\n| |\n| |\n| |\n| |\n|____________________|\n```\n\nWhen you are done, save the file.", "hints": [ "Your castle should match the example", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first", "The whole file should look like this:\n```sh\necho \"", "|", "|", "|", "|", "|\n|____________________|\n\"\n```" ] } ] }, { "id": "200", "title": "Add a roof to the castle", "summary": "", "content": "", "steps": [ { "id": "200.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "1cceeb6626e6e6b804ced5e812ec885eb35cf2b1" ] }, "content": "The existing top row is going to be the roof of the castle. Make it look like this:\n\n```\n| |______________| |\n```\n\nThere's two spaces between the first and second bars, followed by 14 underscores (`_`), then a repeat of the bars and spaces. When you are done, save the file.", "hints": [ "Make sure your castle is still six stories high", "Your top row should match the example", "You should not change any other rows", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first", "The whole castle should look like this:\n```sh\necho \"", "|______________| |", "|", "|", "|", "|\n|____________________|\n\"\n```" ] } ] }, { "id": "210", "title": "Exit", "summary": "", "content": "", "steps": [ { "id": "210.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "c971c2855e0084f21b1e06e0e56a460428760be6" ] }, "content": "The `M` at the beginning of the other commands at the bottom stands for \"meta\". It's a key that doesn't exist on most keyboards. If you're on OSX it means press `escape` then the letter. If you are on another system, press `ALT` then the letter. Use the exit command to get back to the terminal.", "hints": [ "Use `control + x` to exit nano", "Make sure you are in the `castle.sh` file before you exit", "Open the file with `nano castle.sh` if you need to open it first", "If you are trying to reset, exit nano first" ] } ] }, { "id": "220", "title": "Run `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "220.1", "setup": { "commands": [ "bash ./.freeCodeCamp/reset.sh" ], "watchers": [ "../.bash_history" ], "commits": [ "ab567077250ef5610c81d75b3099f63fd636816c" ] }, "content": "Run the script to make sure things are coming along as expected.", "hints": [ "Use the `bash` command to run the script", "Type `bash castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "230", "title": "Nano `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "230.1", "setup": { "watchers": [ "./.freeCodeCamp/test/.next_command" ], "commits": [ "e42221c7f0f681a550bb03413d9db01980f9cad9" ] }, "content": "That construction team must be working hard :smile: . Open the file again to continue building.", "hints": [ "Type `nano castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "240", "title": "Add the second from top row", "summary": "", "content": "", "steps": [ { "id": "240.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "e4c30452efa9bb7f8c6687db28c07a2b3a6d91c6" ] }, "content": "The top of the castle has a lookout tower on each end. Add a single row at the top of your castle to make the top look like this:\n\n```\n/ \\ / \\\n| |______________| |\n```\n\nThe slashes are directly above the vertical bars. When you are done, save the file.", "hints": [ "The top of the castle should match the top row of the example", "The castle should now be seven stories high", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first", "The whole castle should look like this:\n```sh\necho \"\n/ \\ / \\", "|______________| |", "|", "|", "|", "|\n|____________________|\n\"\n```" ] } ] }, { "id": "250", "title": "Add the peaks", "summary": "", "content": "", "steps": [ { "id": "250.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "b64cd739f4646f8396806cb24ab4c335cff582c1" ] }, "content": "Add the peaks of your lookout towers. Put another row at the top with `/\\` above each lookout. It should look like this:\n\n```\n /\\ /\\\n/ \\ / \\\n```\n\nWhen you are done, save the file.", "hints": [ "Your top row should match the top row of the example", "The castle should now be nine stories high", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first", "The whole castle should look like this:\n```sh\necho \"\n /\\ /\\\n/ \\ / \\", "|______________| |", "|", "|", "|", "|\n|____________________|\n\"\n```" ] } ] }, { "id": "260", "title": "Exit", "summary": "", "content": "", "steps": [ { "id": "260.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "e215913971240f6f3939ef5d904a3b22cfe26996" ] }, "content": "Go back to the terminal with the exit command.", "hints": [ "Use `control + x` to exit nano", "Make sure you are in the `castle.sh` file before you exit", "Open the file with `nano castle.sh` if you need to open it first", "If you are trying to reset, exit nano first" ] } ] }, { "id": "270", "title": "Run `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "270.1", "setup": { "commands": [ "bash ./.freeCodeCamp/reset.sh" ], "watchers": [ "../.bash_history" ], "commits": [ "d5c808ad9e7ac0f5cd3528953ac57b83ceb96874" ] }, "content": "Run your script to bask in the glory of your work.", "hints": [ "Use `bash` to run the script", "Type `bash castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "280", "title": "Nano `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "280.1", "setup": { "watchers": [ "./.freeCodeCamp/test/.next_command" ], "commits": [ "e0c416b504fe7e3967f6f52d0fcbfe0cace52d99" ] }, "content": "Oh no!! :open_mouth: Looks like a storm came through and blew the roof off! I think we can fix it. Open up the file.", "hints": [ "Use the `nano` command to open your file", "Type `nano castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "290", "title": "Fix the roof", "summary": "", "content": "", "steps": [ { "id": "290.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "a66c892252665be8a0fe690549273e696d229aa6" ] }, "content": "I'm not quite sure what happened here... Some of the `\\` don't seem to be working. Try adding a space after the two `\\` on the top right lookout tower. Put them where these `x`'s are:\n\n```\n /\\ /\\x\n/ \\ / \\x\n```\n\nMaybe that will patch the roof. When you are done, save the file.", "hints": [ "Put a space in place each `x` in the example", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first", "The whole castle should look like this, but with spaces instead of `x`'s:\n```sh\necho \"\n /\\ /\\x\n/ \\ / \\x", "|______________| |", "|", "|", "|", "|\n|____________________|\n\"\n```" ] } ] }, { "id": "300", "title": "Exit", "summary": "", "content": "", "steps": [ { "id": "300.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "2a2f86dfd77db218ea7f1f50e1cd08b81ce784e4" ] }, "content": "Go back to the terminal so you can run the script again.", "hints": [ "Use `control + x` to exit nano", "Make sure you are in the `castle.sh` file before you exit", "Open the file with `nano castle.sh` if you need to open it first", "If you are trying to reset, exit nano first" ] } ] }, { "id": "310", "title": "Run `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "310.1", "setup": { "commands": [ "bash ./.freeCodeCamp/reset.sh" ], "watchers": [ "../.bash_history" ], "commits": [ "6602be54da4392fb4747497a171007c1dd3ed5ed" ] }, "content": "Run the script to see if the roof is fixed.", "hints": [ "Use `bash` to run the script", "Type `bash castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "320", "title": "Nano `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "320.1", "setup": { "watchers": [ "./.freeCodeCamp/test/.next_command" ], "commits": [ "cccf800e0881bb9841695d2476fe11ea6138571d" ] }, "content": "Okay, it's all patched up. Open the file again.", "hints": [ "Use the `nano` command to open your file", "Type `nano castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "330", "title": "Add windows", "summary": "", "content": "", "steps": [ { "id": "330.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "ef7b88f0298f6e2cddf5b17d95c4204138937ede" ] }, "content": "Add some windows to your castle. Use a left and right brackets for them (`[]`). Put three pairs on the fourth story, like this:\n\n```\n| [] [] [] |\n```\n\nThere's four spaces between each window and three between the window and the sides. Save the file when you are done.", "hints": [ "Add three windows to the fourth row from the bottom exactly like the example", "There's three spaces between a `|` and window", "There's four spaces between a window and another window", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first", "The whole castle should look like this, but with spaces instead of `x`:\n```sh\necho \"\n /\\ /\\x\n/ \\ / \\x", "|______________| |", "|", "[] [] [] |", "|", "|\n|____________________|\n\"\n```" ] } ] }, { "id": "340", "title": "Add the door", "summary": "", "content": "", "steps": [ { "id": "340.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "a9a7f35df4a5d9c099afaeed9e16a463415e9233" ] }, "content": "Last is the door. Change the bottom two rows so there's a door right in the middle that looks like this:\n\n```\n| __ |\n|________| |________|\n```\n\nThe bottom row has two vertical bars with two spaces between them and the second story has two underscores to make the top of the door. When you are done, save the file.", "hints": [ "Make sure your bottom two rows look like the example", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first", "The whole castle should look like this, but with spaces instead of `x`:\n```sh\necho \"\n /\\ /\\x\n/ \\ / \\x", "|______________| |", "|", "[] [] [] |", "|", "__ |\n|________| |________|\n\"\n```" ] } ] }, { "id": "350", "title": "Exit", "summary": "", "content": "", "steps": [ { "id": "350.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "020b696b88454233c1efb6f3d87db5d956a94062" ] }, "content": "Nano has a lot more features, but the basics will get you through most scenarios. Go back to the terminal with the command to exit nano.", "hints": [ "Use `control + x` to exit nano", "Make sure you are in the `castle.sh` file before you exit", "Open the file with `nano castle.sh` if you need to open it first", "If you are trying to reset, exit nano first" ] } ] }, { "id": "360", "title": "Run `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "360.1", "setup": { "commands": [ "bash ./.freeCodeCamp/reset.sh" ], "watchers": [ "../.bash_history" ], "commits": [ "4c0c513f4c43bd8dfd1914b4b5733f76a3e3ecf5" ] }, "content": "Run your script again. Hopefully the weather has been good.", "hints": [ "Use `bash` to run the script", "Type `bash castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "370", "title": "Nano `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "370.1", "setup": { "watchers": [ "./.freeCodeCamp/test/.next_command" ], "commits": [ "35d20abec300b3b4c392bf370ef39d24520007aa" ] }, "content": "Excellent. Open the file, I think there's one more thing you can add.", "hints": [ "Use the `nano` command to open your file", "Type `nano castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] }, { "id": "380", "title": "Add a welcome", "summary": "", "content": "", "steps": [ { "id": "380.1", "setup": { "watchers": [ "./castle.sh" ], "commits": [ "1d75d47634a028583d002a5d2d831d2269f9d8cd" ] }, "content": "At the very top of the file, add another `echo` command with two quotes and an empty line between the quotes. In the empty line put the message, \"Welcome to my castle\". Here's an example:\n\n```\necho \"\nmessage here\n\"\n```\n\nWhen you are done, save the file.", "hints": [ "Add the code above but replace `message here` with the correct message", "The correct message is `Welcome to my castle`", "Put all this at the very top of the file", "Use `control + o` to save the file", "Press `enter` after `control + o` to save the file without changing the name", "If you are trying to reset, exit nano first", "The whole castle should look like this, but with spaces instead of `x`:\n```sh\necho \"\nWelcome to my castle\n\"\n\necho \"\n /\\ /\\x\n/ \\ / \\x", "|______________| |", "|", "[] [] [] |", "|", "__ |\n|________| |________|\n\"\n```" ] } ] }, { "id": "390", "title": "Exit", "summary": "", "content": "", "steps": [ { "id": "390.1", "setup": { "watchers": [ "../.bash_history" ], "commits": [ "c8e6f4cf9ea949ec6a0db0ba9c6d5c7ef0714ed4" ] }, "content": "Go back to the terminal with the exit command so you can see if it's all done.", "hints": [ "Use `control + x` to exit nano", "Make sure you are in the `castle.sh` file before you exit", "Open the file with `nano castle.sh` if you need to open it first", "If you are trying to reset, exit nano first" ] } ] }, { "id": "400", "title": "Run `castle.sh`", "summary": "", "content": "", "steps": [ { "id": "400.1", "setup": { "commands": [ "bash ./.freeCodeCamp/reset.sh" ], "watchers": [ "../.bash_history" ], "commits": [ "0090b3c3e05b7fd0e6a1077764d402c2bdc51ca0" ] }, "content": "This is the last step. Run the script to see your final product :smile:", "hints": [ "Use `bash` to run the script", "Type `bash castle.sh` in the terminal", "Make sure you are in the `project` folder when you enter the command", "If you are trying to reset, exit nano first" ] } ] } ] }