int main ()
{
char buf[256];
int status;
while(1) {
write(1,"NewShell#",10);
if (read (0,buf,256)==0)break;
if (strlen(buf)<1) continue;
if (fork()==0){
buf [strlen(buf)-1]='\0';
execlp(buff,buf,NULL);
LS=argv1
exit(0);
}
wait(&status);
}
return 0;
}
이런식으로 디자인은 했는데 여기서 ls 했을경우 실제로 수행되도록 하려면 어떤식으로