An open API service indexing awesome lists of open source software.

https://github.com/cre8stevedev/simple_shell

Writing a Simple Shell using the C Programming Language. This project is one of the Milestone project in my training as a Full Stack Software Engineer in Alx.
https://github.com/cre8stevedev/simple_shell

Last synced: 5 months ago
JSON representation

Writing a Simple Shell using the C Programming Language. This project is one of the Milestone project in my training as a Full Stack Software Engineer in Alx.

Awesome Lists containing this project

README

          

ALX Simple Shell - Stephen Omoregie


Writing a Simple Shell using the C Programming Language. This project is one of the Milestone project in my training as a Full Stack Software Engineer in Alx.

## Introduction
### The Thompson Shell

In 1971, the original Unix system debuted with the pioneering Thompson shell, designed by Ken Thompson. This shell wasn't meant for scripting but brought in clever new features to the command-line world. Its influence set the stage for the development of later Unix shells, shaping the way we interact with computers via commands.

## General Objective
The major objective of the project was to to help us put together the knowledge we've learnt so far about the C programming languages. With a task to emulate the Thompson shell, we are required to first understand the general concept of how a Shell works.

The Shell as a command line offers an opportunity for the user to communicate with the computer system using commands. This process of reading the command entered by the user, evaluating and subsequently executing such command, printing the output and repeatedly presenting the user with a prompt is the general architecture of the shell.

The C programming language offers us access to some system calls and library functions that allow us seamlessly implement some of these functions and thus we are able to create our own shell - though not full-fledged, but very close to that of the Thompson Shell.

## Methodology

## Allowed Functions
To encourage critical thinking and improve our problem-solving skills, we were given some constraints as to what functions/system calls we are allowed to use. We were NOT allowed to use any of the standard library functions like functions in the stdio or string header files.

List of allowed functions and system calls
- access (man 2 access)
- chdir (man 2 chdir)
- close (man 2 close)
- closedir (man 3 closedir)
- execve (man 2 execve)
- exit (man 3 exit)
- _exit (man 2 _exit)
- fflush (man 3 fflush)
- fork (man 2 fork)
- free (man 3 free)
- getcwd (man 3 getcwd)
- getline (man 3 getline)
- getpid (man 2 getpid)
- isatty (man 3 isatty)
- kill (man 2 kill)
- malloc (man 3 malloc)
- open (man 2 open)
- opendir (man 3 opendir)
- perror (man 3 perror)
- read (man 2 read)
- readdir (man 3 readdir)
- signal (man 2 signal)
- stat (__xstat) (man 2 stat)
- lstat (__lxstat) (man 2 lstat)
- fstat (__fxstat) (man 2 fstat)
- strtok (man 3 strtok)
- wait (man 2 wait)
- waitpid (man 2 waitpid)
- wait3 (man 2 wait3)
- wait4 (man 2 wait4)
- write (man 2 write)

## Custom Functions written to Aid My Implementation

## AUTHOR - STEPHEN OMOREGIE

(ALX Software Engineering Student [August 2023])