tannyaarr / simple_shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  • This is a collaborative project made by Tanya Chiramba and Joseph Abang, Students of software engineering at ALX Africa. This repo contains files for the simple_shell project. The project requires us to develop our own UNIX command interpreter (shell).

File structure

These are the files with custom system calls and functions with a brief description.

file Description
'.shell.c' Contains entry point, file and line reader functions
'AUTHORS' The names of contributors
'README.md' Readme.md file
'shell_data.c' Contains initializer, free and other helperr functions
'exec.c' File contains execution functions
'exec_help.c' Helper functions for the execution of the shell
'tokenizer.c' Line tokenizer and helper function
'getline.c' Gets line
'get_path.c' Gets and handles path
'cmd.c.c' Contains some built-in commands
'cd.c' Contains cd built-in
'string.c' Contains (string.h) functions implemented by the team
'more_string.c' File contains more (string.h) fuctions
'setenv.c' Set environment variables
'shell.h' Header file containing all prototypes
'hsh' Executable File (Program name)

REQUIREMENTS

  • Write a UNIX command line interpreter.
  • Handle command lines with arguments
  • Handle the PATH
  • Implement the exit built-in, that exits the shell
  • Implement the env built-in, that prints the current environment
  • Write your own getline function
  • You are not allowed to use strtok
  • Implement the setenv and unsetenv builtin commands
  • Implement the builtin command `cd`
  • Handle the commands separator ;
  • Handle the && and || shell logical operators
  • Implement the alias builtin command
  • Handle variables replacement
  • Handle comments (#)
  • File as input

About


Languages

Language:C 100.0%