Create a simple Linux Shell by CPP. Operating System Midterm Project. This shell should be able to execute entered commands and display the output to the user.
This shell in addition to the usual commands (such as ls, cd, pwd, ... ) it must be able to execute additional commands related to text processing, which are explained more in the document section.
1- First Element : Returns the first part of each line of the text file separated from the rest of the line by a space (For example, if in a string "Good Morning" exists, it should return "Good").
FE <File Address>
2- Most occurring : Returns the string with the highest number of iterations.
MO <File Address>
3- Remove Spaces : Remove all of the empty spaces (like space, \t, \n, ...) from text file and then display it.
RS <File Address>
4- Display Uncommented Lines (Commented lines are marked with #)
DUL <File Address>
5- Line Counter : Display the number of file lines :
LC <File Address>
6- First Ten Line : Display the first ten lines of the file :
FTL <File Address>
Also, the user can scroll through the history by pressing the up and down buttons of his keyboard to find the command he has entered before.
Besides this, all the commands entered by the user are saved in a file called "cmake-build-debug/History.txt".
When a command is running and the user press CTRL + C , it just stops the execution of that command. To exit the program, you must Command to shell.
I hope you enjoy working with POAL SHELL ;)