All I could really dig up was the following. For handling let's say the command "ls -l *.c". But I have no idea what "globbuf" is. Any of you guys ever tried doing something like this before. I got all my shell code written out, i'm just trying to figure out how to incorporate something like the above command I gave into the shell.
globbuf.gl_offs = count; (count = # of args after command)
glob( expr, GLOB_DOOFFS, NULL, &globbuf );
for( i=0; i < count; i++ ) //copy array of parsed arguments after command to this array
globbuf.gl_pathv[i] = args_in[i];
execvp( cmd, &globbuf.gl_pathv ); //execute