1. Find where is the bash program located on your system and which version is it?...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Find where is the bash program located on your system and which version is it? 2. 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. 3. Add comments in that script and display it to the terminal again. 4. Add information for the users of your script. 5. Change permissions on your script so that you can run it. 6. Run the script in normal mode and in debug mode. It should run without errors. 7. Make errors in your script: see what happens if you misspell commands. Check what the debug comments say about this. 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. 9. 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. 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. 1. Find where is the bash program located on your system and which version is it? 2. 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. 3. Add comments in that script and display it to the terminal again. 4. Add information for the users of your script. 5. Change permissions on your script so that you can run it. 6. Run the script in normal mode and in debug mode. It should run without errors. 7. Make errors in your script: see what happens if you misspell commands. Check what the debug comments say about this. 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. 9. 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. 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.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these accounting questions
-
Check what the debug comments say about this. 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...
-
In Exercises, partition the given matrix so that you can apply one of the formulas from Exercises, and then calculate the inverse using that formula. a. b. 0001 0010 0132 1021 -4V2 V2 0 0
-
In a dream, you find that you can run at superhuman speeds, but there is also a resistant force that reduces your speed by one-half for each second that passes. Assume that the laws of physics still...
-
Use the Chain Rule to evaluate the partial derivative at the point specified. /u and /v at (u, v) = (1,1), where f(x, y, z) = x + yz, x = u + v, y = u + v, z , Z = uv
-
The data in the accompanying table are from the paper Six Minute Walk Test in Children and Adolescents(The Journal of Pediatrics [ 2007]: 395 399). Two hundred and eighty boys completed a test that...
-
The benzoic acid extracted from 86.7 g of catsup required a 15.61-mL titration with 0.0654 M NaOH. Express the results of this analysis in terms of percent sodium benzoate (144.10 g/mol).
-
Explain at least three ways to reduce ATM fees charged to your account. Also describe the trade-offs involved in each action. Write About It Create a list with your explanations.
-
The management of Unter Corporation, an architectural design firm, is considering an investment with the following cash flows: Required: 1. Determine the payback period of the investment. 2. Would...
-
Current Attempt in Progress At December 31, 2021, Wildhorse Co. reported this information on its balance sheet. Accounts receivable $633,000 Less: Allowance for doubtful accounts 41,000 During 2022,...
-
Identify the errors in the following multiple-step income statement: Armortec Company Income Statement For the Year Ended December 31, 2015 Revenue from sales Sales Add: Sales returns and allowances...
-
Port Ormond Carpet Company manufactures carpets. Fiber is placed in process in the Spinning Department, where it is spun into yarn. The output of the Spinning Department is transferred to the Tufting...
-
13. Heparin 7,500 units SC od. How many ml should be administered if the stock is 5,000 units in 5cc vial? 14. Pen G 1,200,000 units IV q6h. How many ml of the drug should be administered if the...
-
Five nursing homes were investigated using a quantitative method. High- and low-performing nursing homes were carefully chosen as extreme case cases. The principal data gathering methods were more...
-
Do you think the Fair Credit Reporting Act should be extended, or similar legislation enacted for the workplace, toprovide greater protections for employees against employer uses or disclosures of...
-
1. The U. S. Constitution sets up a system of checks and balances by creating three co-equal branches of the federal government. Identify those three branches of government and briefly discuss each...
-
An elderly client, Juan Martinez, comes to lawyer Sally Phillips for a power of attorney and revocable living trust.Sally asks paralegal Jane Grisham to include the following provisions in the legal...
-
27 Cash payback period, net present value method, and analysis Elite Apparel Inc, is considering two investment projects. The estimated net cash flows from each project are as follows: Each project...
-
Which of the following statements is false? a. Capital leases are not commonly reported in a Capital Projects Fund. b. A governmental entity may report a Capital Project Fund in one year but not the...
-
Figure is a digraph representing a food web in a small ecosystem. A directed edge from a to b indicates that a has b as a source of food. Construct the adjacency matrix A for this digraph and use it...
-
In Exercises, use the Gauss-Jordan method to find the inverse of the given matrix (if it exists). a. b. c. 1 3 0 2
-
In Exercises 1 and 2, the columns of Q were obtained by applying the Gram-Schmidt Process to the columns of A. Find the upper triangular matrix R such that A = QR. 1. 2. 2-3 23 13 13 2.3 23 3 872...
-
The weights of ice cream cartons are normally distributed with a mean weight of 10 ounces and a standard deviation of 0.5 ounce. (a) What is the probability that a randomly selected carton has a...
-
A machine is set to fill paint cans with a mean of 128 ounces and a standard deviation of 0.2 ounce. A random sample of 40 cans has a mean of 127.9 ounces. The machine needs to be reset when the mean...
-
In a sample of 1000 fines issued by the City of Toronto for parking infractions in September of 2020, the mean fine was \(\$ 49.83\) and the standard deviation was \(\$ 52.15\). A random sample of...
Study smarter with the SolutionInn App