previous | start | next

Builtin Commands

The tsh shell should do each of the builtin commands without creating a child process:

So eval should next call

        int builtin_cmd(char **argv)
     

passing the array of command line strings filled in by the parseline function.

You can use the strcmp function to check. E.g.

        if ( strcmp(argv[0], "quit") == 0 ) {
           exit(0);
        }...
     


previous | start | next