Skip to content

prabodh2/OS_LAB2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 

Repository files navigation

OS_LAB2

1.write a shell script that prints shell scripting is fun and display?
Screenshot 2024-05-06 at 4 42 14 PM
2.modify the shell script from excerice num1 and to include the variable the variable hold the content or message that shell script is nice?
Screenshot 2024-05-06 at 5 01 15 PM
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.
Screenshot 2024-05-06 at 5 09 44 PM
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””.
Screenshot 2024-05-06 at 5 27 33 PM
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.
Screenshot 2024-05-06 at 5 44 11 PM
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.
Screenshot 2024-05-06 at 6 09 29 PM
7.Modify the previous script to that it accepts the file or directory name as an argument instead of prompting the user to enter it.
Screenshot 2024-05-06 at 6 30 44 PM
8.Modify the previous script to accept an unlimited number of files and directories as arguments.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published