Explore BrainMass

Explore BrainMass

    Two shell scripts

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Assignment

    Copy the following shell that completes the following:

    #!/bin/bash

    echo Select a country from the following list:

    echo America, Italy, France, Germany

    read country

    case $country in

    [Aa]merica ) echo Ford; echo Perhaps;;

    [Ii]taly ) echo Ferarri;echo no;;

    [Ff]rance ) echo Peugeot ;echo no way;;

    [Gg]ermany ) echo Porsche ;echo yes;;

    esac

    · Run the shell from above. 5 Points

    · Answer the following questions:

    What is the purpose of the echo command? 5 points
    In the case statement, why are the first letters both caps and lower case? 5 points
    What does esac mean? 5 Points
    · Submit the answers to these questions for grading.

    · Create your own shell that completes the following problem:

    Ask the user their name. 26 points
    Compare it to your name. 26 points
    Give a reply that their response is either your name too or it is a nice name too. 28 points
    Submit a listing of this shell for grading. All work should be in a Word file.
    Please make sure you have screen shoots of the execution of the given script and the work of the create script.
    Also, make sure your script can do both upper and lower case letters

    © BrainMass Inc. brainmass.com November 30, 2021, 3:42 am ad1c9bdddf
    https://brainmass.com/computer-science/files/two-shell-scripts-286817

    Solution Summary

    This solution provides two shell scripts (bash) with an explanation of how they work.

    $2.49

    ADVERTISEMENT