I have a directory filled with several .c source files and I'm trying to write a shell script in another directory that will copy the first .c file from the previous directory, compile it, run and delete, Now I understand how to compile, run and delete files , but I don’t understand how to get only one .c file without knowing its name when there are several files in the directory with the same extension?
source share