Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do 8,9 and 10 Find where is the bash program located on your system and which version is it? Write a script using your

Please do 8,9 and 10 image text in transcribed
Find where is the bash program located on your system and which version is it? Write a script using your favorite editor. The script should display the path to your home directory. Use the cat command to display that script. Add comments in that script and display it to the terminal again. Add information for the users of your script. Change permissions on your script so that you can run it Run the script in normal mode and in debug mode. It should run without errors. Make errors in your script: see what happens if you misspell commands. Check what the debug comments say about this. 1. 2. 3. 4. 5. 7. 8. Use an if/then/elif/else write a script named 'days.sh' that prints the number of days in the current month. Display it on the terminal by using the cat command then run it to make sure that it works correctly. Write an interactive script that asks for the user's age. If it is equal to or higher than 21, print a message saying that this user is allowed to drink alcohol. If the user's age is below 21, print a message telling the user how many years he or she has to wait before legally being allowed to drink. Display your script on the terminal using the cat command. Run the script and give inputs 15, then 30 9. 10. Write a script that takes exactly one argument, a directory name. If the number of arguments is more or less than one, print a usage message. If the argument is not a directory, print another message. For the given directory, print the three biggest files and the three files that were most recently modified. Display your script on the terminal using the cat command. Test your script using arguments that cover two user error cases mentioned above. Then run your script with /usr/sbin as the input

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+ (c) Show that the space is complete.

Answered: 1 week ago