Write a bash script code that take any directory name as an input; then read and display the requested information. Your code should work as follow: 1. Take any directory name as input; ask the user to enter the directory name (or path). Find this directory on the running PC, if it does not exist display a message (the requested directory not found). 2. Count the number of (.png) files in this directory, and display it on the screen. 3. Display a list of files or subdirectory that was created after 10/10/2021. (Hint: your code must read the current date on the running PC then compares it with 10/10/2021). 4. Copy the files that its name begins with (A or a) to a new directory called (beginwith-A). (Note that your code should create this directory on the current working directory).
Write a bash script code that take any directory name as an input; then read and display
the requested information. Your code should work as follow:
1. Take any directory name as input; ask the user to enter the directory name (or path).
Find this directory on the running PC, if it does not exist display a message (the
requested directory not found).
2. Count the number of (.png) files in this directory, and display it on the screen.
3. Display a list of files or subdirectory that was created after 10/10/2021.
(Hint: your code must read the current date on the running PC then compares it with
10/10/2021).
4. Copy the files that its name begins with (A or a) to a new directory called (beginwith-A). (Note that your code should create this directory on the current working
directory).
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 5 images