I need to write a c program that uses the fork and excel system calls to run the shell script mode invoked like this: "./mode 644 ls -l" (that is the argumetns will always be 644 ls -l)
here's the mode script:
#!/bin/sh
octal="$1"
shift
find . -maxdepth 1 -perm $octal -exec $@ {} \;
here's my c program:
int rv;
rv = execl("mode","644","ls","-l");
getchar();
I don't get how to use fork and excel really?