Create a program named shell.c that executes an infinite loop and while in the loop
- Prints “$” to stdout
- Reads a filename from stdin
- If the filename is an executable in one of the directories listed in the PATH environmental variable or is in the current working directory then the program creates a child process and executes the filename using an exec method. The parent process should wait for the child process to terminate before continuing in the loop.
- If the filename is not executable or is not found the program prints “invalid file name”.
© 2017, Eric. All rights reserved.