-
Notifications
You must be signed in to change notification settings - Fork 0
JordanMontgomery/psh
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The Pipe Shell By Elijah Montgomery The P shell This program implements a very simple UNIX shell in C using Flex and Bison. Originally, this was created for CS485G Systems Programming with Professor Griffioen at University of Kentucky. I have since modified it slightly and plan to do more work on it in the future. Also, I believe it serves as a good example of how one can implement a simple shell or other programs in C with Flex and Bison. Included files are: - psh.y: Input parser implemented with GNU bison. Note that this also includes the functions to execute the parsed input - psh.l: Input lexical analyzer implemented with flex - psh.h: Pipe shell header file. Defines the node type used by the bison parser as well as a few other things needed by the shell - varlist.c: Symbol table implemented using a singly-linked list in C - varlist.h: Header file for symbol table. Defines node type used by symbol table and a few other things needed by the symbol table. - Makefile: Makefile to build the entire project - README: information about the program To compile: - Type "make" from the root directory of the project To delete compilation files: - Type "make clean" from the root directory of the project Features: - Includes all builtin commands listed in the project spec - Uses path to execute command, so ls can be executed with "ls" or "/bin/ls" - Checks errno's value after system calls to create more informative error messages Limitations: - Cannot currently execute builtin commands using a variable as the command name. For example: setvar $mycmd echocmd $mycmd on would attempt to execute echocmd as a system command - Prompt cannot be a dynamic prompt like many shells support. It must be a static string and is only changed when the user explicitly changes it. - Cannot use complex variable substitution like having $myvar.txt substitute in the value of myvar
About
psh: The Pipe Shell
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published