assistance with specific command in Bash -
i have proggram written in c
argv[0]=command; argv[1]=null; if(strcmp(command,"ls > try.txt")) { dup2(fd,1); close(fd); execvp(command,argv); perror("execvp"); exit(1); } execvp(command,argv); perror("execvp"); exit(1);
i want: if write ls >try.txt command work
Comments
Post a Comment