/unix-shell-and-history-feature

A simple unix shell with history feature

Primary LanguageC

unix-shell-and-history-feature

This program serves as a shell interface. The shell interface accepts user commands and then executes a separate process. In response to the user, the command prompt is entered as follows, then the system waits for the user to enter the command and the entered command is executed.

Step 1: osh>
Step 2: osh>ls

The waiting relationship between parent and child can be two format.
1. The parent process waits for the child process to finish.
2. Parent and child work concurrently. This situation is valid when the "&" character is wrote at the end of the command.
Example: osh>ls &

If the user enters the exit command in the command line entry, the application terminates.
The example command line looks like the following:
osh>exit

Another special feature of the project is that it supports a special history command. For example, the most commonly used 10 commands are listed together with usage numbers.
osh>history