if(numpipes==0) { // single command } else { int fdsl[2]; // file descriptors currently dealing the pipe to the left of the current process int fdsr[2]; // file decsriptors currently dealing the pipe to the left of the current process char** argv=new char*[cmd2.size()]; int i=0,j; if(pipe(fdsr)<0) { //error } for(j=0;cmd2[i+j]!="|"&&i+j