if(numpipes==0) { // single command } else { int fdsi[2]; // file descriptors currently dealing with input int fdso[2]; // file decsriptors currently dealing with output char** argv=new char*[cmd2.size()]; int i=0,j; if(pipe(fdso)<0) { //error } for(j=0;cmd2[i+j]!="|"&&i+j