Purchase Solution

How to set PATH and EDITOR Variables in Linux login Script

Not what you're looking for?

Ask Custom Question

Login to your Linux environment and create your start-up shell script. Whether you write the scripts as .profile or .cshrc, include the following options:

* Your search path to $PATH
* Your editor to vi
* Two variables of your preference, explain what they are.

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.

Answer the following questions:

· What is the purpose of the echo command?

· In the case statement, why are the first letters both caps and lower case?

· What does esac mean?

Submit the answers to these questions to your faculty member for grading.

Create your own shell that completes the following problem:

· Ask the user their name.

· Compare it to your name.

· Give a reply that their response is either your name too or it is a nice name too.

· Submit a listing of this shell to your faculty member for grading.

· Copy/Paste or attach a screen print.

Copy/paste the screen shots

Purchase this Solution

Solution Summary

Login to your Linux environment and create your start-up shell script. Whether you write the scripts as .profile or .cshrc, include the following options:

* Your search path to $PATH
* Your editor to vi
* Two variables of your preference, explain what they are.

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.

Answer the following questions:

· What is the purpose of the echo command?

· In the case statement, why are the first letters both caps and lower case?

· What does esac mean?

Submit the answers to these questions to your faculty member for grading.

Create your own shell that completes the following problem:

· Ask the user their name.

· Compare it to your name.

· Give a reply that their response is either your name too or it is a nice name too.

· Submit a listing of this shell to your faculty member for grading.

· Copy/Paste or attach a screen print.

Copy/paste the screen shots

Solution Preview

Part 1:

#!/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.

Answer the following questions:

Q1 What is the ...

Purchase this Solution


Free BrainMass Quizzes
Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Basic Networking Questions

This quiz consists of some basic networking questions.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Javscript Basics

Quiz on basics of javascript programming language.