Skip to content

codeabuu/simple_shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

0x16. C - SIMPLE SHELL

This is a TEAM Project done during Full Stack Software Engineering studies at ALX School. The objective of this project is to understand the concept about building shell from scratch in C language.

Technologies

  • C files are compiled using gcc 4.8.4
  • C files are written according to the C90 standard
  • Tested on Ubuntu 14.04 LTS
  • Team Members: Lawrence Maduabuchi & Abdullahi Ngui
  • Date: May 10th 2023

Files

All of the following files are programs written in C:

Filename Description
0. Betty would be proud Write a beautiful code that passes the Betty checks.
1. Simple shell 0.1 Write a UNIX command line interpreter.
2. Simple shell 0.2 Simple shell 0.1 +.
3. Simple shell 0.3 Write a function that adds a new node at the end of a list_t list.
4. Simple shell 0.4 Simple shell 0.3 +
5. Simple shell 1.0 Implement the env built-in, that prints the current environment.
6. Simple shell 0.1.1 Write your own getline function, use a buffer to read many chars at once call the least possible the read system call.
7. Simple shell 0.2.1 Simple shell 0.2 +.
8. Simple shell 0.4.1 Simple shell 0.4 +; handle arguments for the built-in exit; Usage: exit status, where status is an integer used to exit the shell.
9. Setenv, unsetenv Implement the setenv and unsetenv builtin commands.
10. cd Implement the builtin command cd:
11. ; Simple shell 1.0 +. Handle the command seperator
` 12. && and
' 13. alias - Simple shell 1.0+ Implement the alias builtin command; Usage: alias [name[='value']...].
' 14. Variables - Handles variable replacement, Handle the $? variable, Handle the $$ variable
' 15. Comments - A program that handles comments (#) using simple shell 1.0+ Git repository: simple shell.
' 16. File as Input - Usage: simple_shell [filename]; Your shell can take a file as command line argument. The file contains all commands line arguement; The file contains all the commands that your shell should run before exiting; The file should contain one commanf line; in this mode, the shell should not print a promptand should not read from stdin

Files

All files used for this SHELL programs are written in C:

Filename Meaning
Inline.c This is the builtin function. is used to suggest the compiler to perform inline expansion of a function, which means inserting the function code directly at the call site instead of generating a separate function call
Error_handling.c Handles errors from the program like return values, error codes, error handling functions, exception handling and assertions.
User_input.c prompts user inputs on console. This is used to validate and sanitize the input to ensure correctness and prevent potential vulnerabilities
Main.c This is the entry point of this program. This is header files embed that handles performance initialization, call other functions, handles command line arguments and perform the primary logic of the program within the main function.
Text_operations.c Handles strings conversion like case, pattern matching, string tokenization, string length, substring extraction.
Environment.c The environment variable like displaying env, iterating through environment variables, accessing environment variables.
Exit_handling.c Checks for exits handlers.
Get_Line.c provides reusable functions for safety and efficiency reading lines of text in the program .
Linked_lists1.c The list function.
Stack.c Handles memory.
Reallocation.c memory allocation mechanism.
Interactive-shell.c Shell loop .
lexer Tokenization
Inline1.c .
Error1_handling Error.
Get_env.v Environment console.
Narrative.c History in the making.
Linked_lists.c lists.
Parsing.c Parse key.
Shell.h Shell process.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages