Share
Explore BrainMass

Shell Scripting in Knoppix

I am trying to create a script in Knoppix 4.02 (KDE or Kwrite or Kate) based on the following requirements below. I want to create a prompt that will:

· Request user specific name

· I want Linux to compare it to an established name(Esther)

· I want the Linux to find the user specified name or Esther asking is this your name or another.

I am also using Knoppix 4.02 to , create the file below but I can not turn on vim text editor on . When I open up kWrite or Kate I get nothing and Konsole leave me lost when insert the following text below . I attempt to create and run file after e text is entered into vi editor . Once complete I have tried to execute and run the script but no avail. Please help. Program is Knoppix 4.02 version of Linuz

#!/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 Absolutely;;

esac

I am trying to create a script in Knoppix 4.02 (KDE or Kwrite or Kate) based on the following requirements below. I want to create a prompt that will:

· Request user specific name

· I want Linux to compare it to an established name(Esther)

· I want the Linux to find the user specified name or Esther asking is this your name or another.

Solution Preview

The program you have written works quite well. What you need to do is the following.
Suppose you have written it to a file "foo.sh". What you need to do is to save it and make it executable. By executable I mean do chmod +x foo.sh

afterwards you can type ./foo.sh Or sh foo.sh to make the program work (from the ...

Solution Summary

Shell Scripting in Knoppix is featured.

$2.19