c. For an invalidly named file that starts with file and is followed by any characters...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
c. For an invalidly named file that starts with file and is followed by any characters that include some non-binary digits: i. echo the following output to the terminal screen: invalid filename non-binary characters after 'file' ii. Move the invalid file to a subdirectory called CATEGORY3 (the script should only create the directory here if it does not already exist and also only when a file in this category is found). d. For an invalidly named file that does not start with file: i. echo the following output to the terminal screen: invalid filename does not start with 'file' ii. Move the invalid file to a subdirectory called CATEGORY4 (the script should only create the directory here if it does not already exist and also only when a file in this category is found). 8. If the command-line argument specified directory contains no files: a. echo the following output to the terminal screen: The directory dirname contained no files... b. exit the script This also means if you run the script twice, the first time should process any files, displaying the outputs specified in requirement 7 above, renaming where appropriate, and moving files to specified category subdirectories. Running the script for a second time (with the same directory argument) will produce the output specified in this requirement (requirement 8), as all files should have already moved to subdirectories. Your output should never "process" or mention the subdirectory names. Binary to Decimal Renaming As previously mentioned, a validly named file will have the form fileABCDEFGH, eg file01010111 Your script must implement an algorithm only using commands and syntax as discussed in practical classes. Your solution is restricted (i.e not allowed) to use the shell "builtin" conversion .g. echo $((2# 101010101)) c. For an invalidly named file that starts with file and is followed by any characters that include some non-binary digits: i. echo the following output to the terminal screen: invalid filename non-binary characters after 'file' ii. Move the invalid file to a subdirectory called CATEGORY3 (the script should only create the directory here if it does not already exist and also only when a file in this category is found). d. For an invalidly named file that does not start with file: i. echo the following output to the terminal screen: invalid filename does not start with 'file' ii. Move the invalid file to a subdirectory called CATEGORY4 (the script should only create the directory here if it does not already exist and also only when a file in this category is found). 8. If the command-line argument specified directory contains no files: a. echo the following output to the terminal screen: The directory dirname contained no files... b. exit the script This also means if you run the script twice, the first time should process any files, displaying the outputs specified in requirement 7 above, renaming where appropriate, and moving files to specified category subdirectories. Running the script for a second time (with the same directory argument) will produce the output specified in this requirement (requirement 8), as all files should have already moved to subdirectories. Your output should never "process" or mention the subdirectory names. Binary to Decimal Renaming As previously mentioned, a validly named file will have the form fileABCDEFGH, eg file01010111 Your script must implement an algorithm only using commands and syntax as discussed in practical classes. Your solution is restricted (i.e not allowed) to use the shell "builtin" conversion .g. echo $((2# 101010101))
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these business communication questions
-
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...
-
answer all questions as instructed below. make sure you have attended all questions .Comparative Architectures (a) Describe the organisation of a two-level branch predictor that makes use of a global...
-
Find the coordinates of the vertices and the foci of the given hyperbolas. Sketch each curve. 9y 2 16x 2 = 9
-
Explain how the oxidation of molecules inside cells differs from the burning of substances outside cells.
-
Refer to the facts described in BE 416. Show the DuPont frameworks calculation of the three components of the 2024 return on equity for Circuit TV and Appliance. Data from in BE 4-16 The 2024 income...
-
What are some indicators that a digital device has been infected?
-
The road system around the hotel complex on International Drive (node 1) to Disney World (node 11) in Orlando, Florida, is shown in the network of Figure. The numbers by the nodes represent the...
-
What is immediate, up-to-date information? What is Real-time systems Information governance?
-
NERVOUS SYSTEM Describe the anatomy of neuron. Describe the classification of neuron. Define the following terms White matter Tracts Gray matter Nuclei Ganglia Cortex Nerves Describe central and...
-
Identify the critical tasks of the Culmination Stage and give examples as it applies to your internship and how you will have an engaged response.
-
Burnout in the workplace is one of the most significant concerns Define burnout and mention 5 reasons for it and suggest 5 ways to reduce burnout at work
-
- Consider an underdamped undriven oscillator with a period of 1 s, starting from 80 = 0.1 and wo = 0. Sketch qualitatively correct vs t, and w vs t plots for several periods and an w vs plot...
-
simplify ( 2 x ^ 3 ) ( 3 x ^ 2 ) / ( x ^ 2 ) ^ 3
-
Define Indirect Wage/Benefits. State and explain any 3kinds of benefits given to employees
-
A block of mass m 2 on a rough, horizontal surface is connected to a ball of mass m 1 by a lightweight cord over a lightweight, frictionless pulley as shown in figure (a). A force of magnitude F at...
-
Could a set of three vectors in span all of? Explain. What about n vectors in when n is less than m? R4
-
Jason and Mary Wells, friends of yours, were married on December 30, 2012. They know you are studying taxes and have come to you with a question concerning their filing status. Jason and Mary would...
-
In 2012, Michael has net short-term capital losses of $2,000, a net long-term capital loss of $45,000, and other ordinary taxable income of $45,000. a. Calculate the amount of Michael's deduction for...
-
Leslie and Leon Lazo are married and file a joint return for 2012. Leslie's Social Security number is 466-47-3311 and Leon's is 467-74-4451. They live at 143 Snapdragon Drive, Reno, NV 82102. For...
-
The mean height of American males is 69.5 inches. The heights of the 43 male U.S. presidents* (Washington through Obama) have a mean 70.78 inches and a standard deviation of 2.77 inches. Treating the...
-
Contrast the assumptions for a finite distributed lag model with those for an infinite distributed lag model.
-
Compute delay, interim, and total multipliers for finite and infinite distributed lag models.
Study smarter with the SolutionInn App