Question
Using Bash command line user interface. The directory ~/class/e01/q05 contains four files: in1.html, in2.html, in3.html and in4.html To complete this question, create a file q05.sh
Using Bash command line user interface.
The directory ~/class/e01/q05 contains four files: in1.html, in2.html, in3.html and in4.html
To complete this question, create a file q05.sh that when sourced (as in source q05.sh) will execute the appropriate Linux commands to do the following:
1. Create a file named hrefs.txt that contains all the lines from the four files above that contain the string href (independent of case).
2. Create a file named pics.txt that contains all the lines from the above four files that contain either jpg, jpeg or gif file (again independent of case).
3. Display the number of lines in hrefs.txt (Im looking for an output line containing a single number)
4. Display the number of lines in pics.txt (Im looking for an output line containing a single number)
5. Display the number of gif files found in the four files above (again, just a number).
The file check05.sh has been provided to help you check your progress. When you are done, enter DONE for part A of the a05.txt file. Enter the following answers into the a05.txt file for parts B and C:
A. DONE
B. The number of lines in the hrefs.txt file
C. The number of lines in the pics.txt file
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started