This project is an implementation of an interactive shell in C, developed as part of an Operating System course. The shell supports various commands and functionalities typical of Unix-like shells.
-
Display Requirement
- Displays a shell prompt
<Username@SystemName:~>showing the current directory.
- Displays a shell prompt
-
warp
- Changes the current directory.
- Supports symbols like
~,.,.., and-. - Handles both absolute and relative paths.
-
peek
- Lists files and directories in a specified directory.
- Supports flags
-a(all files) and-l(detailed info). - Handles symbols like
~,.,.., and-.
-
pastevents
- Stores and retrieves the 15 most recent commands.
- Supports executing past commands by index.
-
System commands
- Executes other system commands (e.g.,
emacs,gedit) in foreground and background processes.
- Executes other system commands (e.g.,
-
proclore
- Displays information about processes spawned by the shell.
-
seek
- Searches for files/directories in a target directory.
- Supports flags
-d,-f, and-e.
-
I/O Redirection
- Supports redirection operators
>,>>, and<.
- Supports redirection operators
-
Pipes
- Supports piping multiple commands together.
-
activities
- Lists processes spawned by the shell.
-
Signals
- Sends signals to processes (
pingcommand). - Handles Ctrl-C, Ctrl-D, and Ctrl-Z signals.
- Sends signals to processes (
-
fg and bg
- Brings background processes to foreground (
fg). - Resumes stopped background processes (
bg).
- Brings background processes to foreground (
-
Neonate
- Prints the PID of the most recently created process at intervals until 'x' is pressed.
- iMan
- Fetches man pages from http://man.he.net/ using sockets.
- Displays basic command information.
Compile the shell using the provided Makefile.
Use the implemented commands as described in the specifications document.
- The shell handles both interactive and batch modes.
- Error handling is implemented for various scenarios (e.g., file not found, permission denied).
- Memory management practices are followed to prevent memory leaks.
This project was developed as part of the Operating System course.