1)Write a shellscript program that prints shellscripting is fun on the screen
Output:
Code:
2)Modify the shellscript from exercise number one to include a variable the will variable will hold the cotent of the message that is shellscripting is nice
Output:
Code
3)Store the output of the command “hostname” in a variable. Display “This script is running on _.” where “_” is the output of the “hostname” command.
Output:
Code:
4)Write a shell script to check to see if the file “file_path” exists. If it does exist, display “file_path passwords are enabled.” Next, check to see if you can write to the file. If you can, display “You have permissions to edit “file_path.””If you cannot, display “You do NOT have permissions to edit “file_path””
Output:
Code:
5)Write a shell script that displays “man”,”bear”,”pig”,”dog”,”cat”,and “sheep” on the screen with each appearing on a separate line. Try to do this in as few lines as possible.
Output:
Code:
6)Write a shell script that prompts the user for a name of a file or directory and reports if it is a regular file, a directory, or another type of file. Also perform an ls command against the file or directory with the long listing option.