SCCL is a simple UNIX-like command line written in C. It is in NO way meant to replace any existing CLIs or Shell such as BASH. SCCL is an educational project I undertook to challenge myself in writing a simple CLI using my current knowledge of C.
*Basic File manipulation and sysadmin commands builtin with UNIX-Like syntax
*Cross-Platform and portable
*Intuitive and easy-to-use
*Networking commands to fetch files and transfer data on the net such as "wget" on bash
*basic text editor to edit files such as "GNU nano" or "vim"
UPDATE: very basic text editor implemented as "textedit".
*Multi-Tasking commands to manage different processes on host system
SCCL relies heavily on functions mostly found in low-level libraries such as unistd.h and stdio.h making it portable across most of today's platforms.
The program first displays a welcome graphic detailing the CLI's version.Then, the user is prompted to enter a password which will later be used for the logout feature. the file passwd is created and the password stored inside a string and inside passwd with fprintf. we then close it and move on to the prompt.
we then move on to a while(1){} infinite loop in which we ask for the user's input. we compare the input with the known commands with strcmp() and execute if it matches. if not we goto* PROMPT.In most CLIs commands have arguments which allow you to specify what to do with your command. In order to avoid having to deconstruct the user's input into multiple strings without spaces we ask the user to first input the command (for e.x "cd") and then ask him to input the necessary arguments in seperate scanf() instances. So the user types :
root@SCCL # cd
Enter new directory : mydir
This is to simply the coding process. It is true that simply typing "cd mydir" is faster but for the moment I focused on making a functional CLI.
*I am aware that using goto is a frowned upon practice in programming, however I had the mindset that for a simple program,using goto is not a problem.
SCCL is currently readily available on windows as a standalone executable can be found in the debug folder, however OSX and Linux versions will have to be compiled manually.
- Code::Blocks - IDE
- GNU GCC - Compiler
Please read CONTRIBUTING.MD for my rules and things to keep in mind when contributing
The entire code was written by me (suroxdesigns) and some parts inspired by various resources online.
This project is licensed under the GPLv3