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.
https://brainmass.com/computer-science/pseudocode/shell-script-knoppix-283505
Solution Preview
When you run the attached script 283505.sh, you will get an output similar to following.
------ sample ...
Solution Summary
The solution also gives a sample output from execution of script.