I'm trying to do the following:
execl("/bin/grep","grep","print",fd,NULL);
where fd is a file descriptor.
So basically this should grep for "print" in the file pointed to by fd.
It doesn't seem to work although I get no compile errors/warnings.
It works when I give a filename such as "Something.txt"
instead of the fd
Can someone tell me why this isn't working? (I know that execl takes only const char arg*
but as I said no compile errors/warnings).