1.write a shell script that prints shell scripting is fun and display?
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?
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.
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””.
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.
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.
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.
8.Modify the previous script to accept an unlimited number of files and directories as arguments.
-
Notifications
You must be signed in to change notification settings - Fork 0
prabodh2/OS_LAB2
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published