open the .file for each line doIt() close while true get a line of input split it wordexp doIt() doIt() if ";" doIT(left) doIt(right) if "." open for each line doIt() close if "cd" chdir error check else if "exit" cout save histroy exit else if contains "=" putenv else fork if kid if > // output which is fd = 1 dup2 remove from list if < // input which is fd=0 dup2 remove from list for each thing in path execvp(argv[0], argv); exit if parent waitpid