Create a script where you prompt the user for input, and the value provided will be a user. Loop through each file in that user's home directory (ignore the sub directories) and count the number of times a file contains the word ERROR (hint use 'wc' command to help with counting) and output the total number of errors at the end of the script. Once completed, take a screenshot of the source code of the script, and of the script executing, to execute the script you will need to create your own sample input, please include the sample input as part of your execution screenshot. questio

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 3GZ
icon
Related questions
Question
Answer all questions else downvote question 1. Create a script where you prompt the user for input, and the value provided will be a user. Loop through each file in that user's home directory (ignore the sub directories) and count the number of times a file contains the word ERROR (hint use 'wc' command to help with counting) and output the total number of errors at the end of the script. Once completed, take a screenshot of the source code of the script, and of the script executing, to execute the script you will need to create your own sample input, please include the sample input as part of your execution screenshot. question 2. What would be your current working directory if you changed directories to /log/././././../media/log/ssh/test/../users/ question 3. What would be your current working directory if you changed directories to /opt/test/usr/www/sbin/boot/pdfs/./spool/share/etc/./bin/.././httpd/
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage