I need to write a script called DirCompile that receives a directory path as a command line argument and compile all the c/cpp files.for example helloWorld.c file will  be compiled into helloWorld.exe. all of the compiled files will be placed in a folder named compiled files under the current library, and it should also have the right permissions.I more or less know the commands to what is required but I am failing to put it together
Compiling c/cpp files in a directory given as an input
shell script;directory;compiling