Question: Write a simple bash script program that loops through a user given folder ($1) and returns all the files with a .c file type extension.

Write a simple bash script program that loops through a user given folder ($1) and returns all the files with a .c file type extension.

For example, I run the program with:

bashscript.sh [folder path]

The code will then loop through that folder and return all the files that are of type .c. It should return:

2 Files found:

script.c

file.c

If none then it should return:

No files with .c in folder found.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!