Skip to main content

Examples

Below are a couple of examples for how you should go about this assignment.

Example 1:โ€‹

Setupโ€‹

  1. Navigate to your repository in the command line.
  • You can either use the cd PATH_TO_FOLDER command.
    • In my case the command was cd /Users/wesreed/git/School/IT3049/Bash-Basics
    • Use the pwd command to Print Working Directory and confirm your location
  • OR You could open VSCode integrated terminal window and it will open in the terminal already in the right path.
  1. Run the tests by running each bash script

    example image

  • Notice all the errors, our goal for this assignment is to resolve them all.

Getting Down to Businessโ€‹

  1. Open the project in Visual Studio Code (Not Visual Studio)

    example image

    Let's try to solve a couple of those tests.

  2. Open the file 1-hello-world.sh

    #!/bin/bash

    • Notice the empty implementation of this script. We need to add the code to make it work and output what the test is expecting
  3. Consulting the Bash documentation for echo. The documentations shows usage examples, and specifies the parameters of the command.

    int() docs

    Key Takeaways:

      #!/bin/bash

    echo "Hello, World!"
  4. Re-run the tests again and let's see if it passes

    1 passing test
  5. Commit your code commit logo git commit -m "finished test parseInt".

On to the next test .. Rinse ๐Ÿงผ and Repeat ๐Ÿ”