Explore BrainMass
Share

Shell Scripting in Knoppix

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

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.

© BrainMass Inc. brainmass.com October 16, 2018, 7:34 pm ad1c9bdddf
https://brainmass.com/computer-science/files/shell-scripting-knoppix-120165

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
Similar Posting

Shell script for Knoppix

Convert the pseudocode given below into an executable shell script for Knoppix, following the same order.

Pseudo-code:

· Change to the /tmp directory.
· Change to your home directory.
· Display the previous working directory using a shell variable.
· Display your home directory using a shell variable.
· Display your home directory using an alternate method to using a shell variable.
· Display the amount of time the shell will wait for user input before the current shell is terminated using a shell variable.
· Set the previous variable to 120.
· Display the amount of time the shell will wait for user input before the current shell is terminated using a shell variable.
· Set the previous variable to 0.

View Full Posting Details