Write a BASH script that performs the following operations: Prompts the user to enter the number...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a BASH script that performs the following operations: Prompts the user to enter the number of searches they want to perform (N) • Run a loop N times, each iteration should do the following Ask the user to enter a mode (1 or 2) If the user enters 1, search for filename as follows Prompt the user for the name of the file they wish to search for Prompt the user for the directory the want to start the search in . Search for the user specified file in the user specified directory, outputting the results to the screen If the user enters 2, search for files based on user who owns file Prompt the user for the name of the user they wish to find files owned by Prompt the user for the directory they want to start the search in Search for files owned by the specified owner in the specified directory, outputting the results to the screen. • End loop after N iterations. Write a script that prompts the user to enter the name of a file they wish to perform an action on. Following this, provide the user with a menu comprising two options. Option 1 is to show the file permissions of the file while Option 2 is to delete the file. Ask the user to enter 'p' to choose option 1 or 'd' to choose option 2. After the user has entered their option, perform the action required for that option (i.e. show file permissions or delete the file) Write a BASH script that performs the following operations: Prompts the user to enter the number of searches they want to perform (N) • Run a loop N times, each iteration should do the following Ask the user to enter a mode (1 or 2) If the user enters 1, search for filename as follows Prompt the user for the name of the file they wish to search for Prompt the user for the directory the want to start the search in . Search for the user specified file in the user specified directory, outputting the results to the screen If the user enters 2, search for files based on user who owns file Prompt the user for the name of the user they wish to find files owned by Prompt the user for the directory they want to start the search in Search for files owned by the specified owner in the specified directory, outputting the results to the screen. • End loop after N iterations. Write a script that prompts the user to enter the name of a file they wish to perform an action on. Following this, provide the user with a menu comprising two options. Option 1 is to show the file permissions of the file while Option 2 is to delete the file. Ask the user to enter 'p' to choose option 1 or 'd' to choose option 2. After the user has entered their option, perform the action required for that option (i.e. show file permissions or delete the file)
Expert Answer:
Answer rating: 100% (QA)
binbash Prompt the user to enter the number of searches they want to perform N echo How many searche... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these computer network questions
-
A rapidly growing technology startup has doubled in size over the past year. They are now facing challenges in managing their workforce efficiently. Develop a human resource planning strategy to...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Approximately 8.33% of men are colorblind. You survey men from a large population until you find one who is colorblind. a. Explain in words what X is in this situation and what values it can take. b....
-
Proceeding from Maxwell's equations show that in the case of a plane electromagnetic wave (Fig. 4.38) propagating in vacuum the following relations hold: B. c2- t
-
For Problem rewrite in equivalent logarithmic form. 8 = 4 3/2
-
Explain the difference between design, analysis, and patterns.
-
Soft tissue follows an exponential deformation behavior in uniaxial tension while it is in the physiologic a normal range of elongation. This can be expressed as Where = stress, = strain, and E o...
-
Boyd Corporation issued $1,500,000 of 9% nonconvertible bonds at 107, due in 10 years. Each $1,000 bond was issued with 45 detachable stock warrants, each of which entitled the holder to purchase,...
-
Des Moines Power and Light has been collecting data on demand for electric power in its western subregion for only the past 2 years. Those data are shown in the table at the top of the shown below....
-
Despite being a fairly old technology, menu-driven interfaces are very common in user interface design. Menu-driven interfaces consist of a series of screens that are navigated by choosing options...
-
Net Present Value. Your organization must decide on whether to accept a project that has been requested by the research and development department. The initial investment is $350,000. The team has...
-
Why is it important for the risk management report form to include who is directly responsible for the risk?
-
Kate Thomas, a project manager with Johnson & Rogers Software Engineering, was looking forward to her first project team meeting. She applied quotes to the term meeting because she would not actually...
-
Calculate the fully loaded cost of labor for a project team member using the following data: Hourly rate: $52/hr Hours needed: 120 Overhead rate: 60%
-
Knut Yrvin functions as the team leader for an initiative to replace proprietary operating systems with Linux-based technology in schools in Norway (the project is named Skolelinux). Read his...
-
Use graphs and numerical summaries to describe how the following three datasets are similar and how they are different. A: 5, 7, 9, 11, 13, 15, 17 B: 5, 6, 7, 11, 15, 16, 17 C: 5, 5, 5, 11, 17, 17, 17
-
You are standing at x = 9.0 km and your assistant is standing at x = 3.0 km. Lightning bolt 1 strikes at x = 0 km and lightning bolt 2 strikes at x = 12.0 km. You see the flash from bolt 2 at t = 10...
-
In business applications, you are often asked to compute the mean and standard deviation of data. The mean is simply the average of the numbers. The standard deviation is a statistic that tells you...
-
Write a program to create a file named Exercise12_15.txt if it does not exist. Write 100 integers created randomly into the file using text I/O. Integers are separated by spaces in the file. Read the...
-
Write a program that converts the Java source code from the next-line brace style to the end-of-line brace style. For example, the following Java source in (a) uses the next-line brace style. Your...
-
An inborn error of metabolism is caused by a. a mutation in a gene that causes an enzyme to be inactive. b. a mutation in a gene that occurs in somatic cells. c. the consumption of foods that disrupt...
-
During the initiation stage of translation in bacteria, which of the following events occur(s)? a. IF1 and IF3 bind to the 30S subunit. b. The mRNA binds to the 30S subunit, and tRNAfMet binds to the...
-
Each ribosomal subunit is composed of a. multiple proteins. c. tRNA. b. rRNA. d. both a and b.
Study smarter with the SolutionInn App