Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shell (copy 1)

Shell Project - Learning Objectives

Learning Objectives

At the end of this project, you are expected to be able to explain to anyone, without the help of Google:

General

  1. Origins of Unix: Understand who designed and implemented the original Unix operating system and its historical significance.

  2. UNIX Shell: Recognize the authorship of the first version of the UNIX shell and its role in interacting with the operating system.

  3. B Programming Language: Learn about the B programming language, the precursor to the C programming language, and its creator.

  4. Ken Thompson: Gain knowledge about Ken Thompson, a legendary computer scientist, and his contributions to Unix and programming languages.

  5. How a Shell Works: Understand the fundamental concepts of how a shell works, including its role in processing commands and managing processes.

  6. PID and PPID: Explore the concepts of PID (Process ID) and PPID (Parent Process ID) and their significance in process management.

  7. Environment Manipulation: Learn how to manipulate the environment of the current process, including managing environment variables.

  8. Function vs. System Call: Distinguish between functions and system calls and understand their respective purposes.

  9. Process Creation: Discover how to create processes in Unix-based systems, including the fork() system call.

  10. Main Prototypes: Familiarize yourself with the three prototypes of the main function used in C programming.

  11. PATH Variable: Understand how the shell uses the PATH environment variable to locate executable programs.

  12. Execve System Call: Learn how to execute another program within a process using the execve system call.

  13. Process Synchronization: Explore the concept of process synchronization and how to suspend process execution until a child process terminates.

  14. EOF (End-of-File): Define EOF and understand its role in input/output operations in Unix.

Copyright and Plagiarism

  • You are responsible for solving the project tasks independently, avoiding plagiarism or unauthorized copying.

  • Publishing any content of this project, including code, is strictly prohibited.

  • Plagiarism will result in removal from the program.

Requirements

General

  • You may use editors such as vi, vim, or emacs to write your code.

  • All code files will be compiled on Ubuntu 20.04 LTS using gcc with the options: -Wall -Werror -Wextra -pedantic -std=gnu89.

  • Each code file should end with a new line.

  • A README.md file at the root of the project folder is mandatory.

  • Your code should adhere to the Betty style, and it will be checked using betty-style.pl and betty-doc.pl.

  • Ensure there are no memory leaks in your shell program.

  • Limit the number of functions in a single file to no more than 5.

  • Use include guards for all header files.

  • Utilize system calls only when necessary and justify their use.

  • Write a detailed README that describes your project.

  • Create an AUTHORS file at the root of your repository to list all contributors to the repository (following a specified format).

By meeting these requirements, you will demonstrate your understanding of shell programming and best practices in Unix-based development.

USAGE

It is as simple as:

compile the file : gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh

and start interacting with the shell

example:

  $ls
  $ ls
  builin.c                       handling.c            main.c
  changingDirhandling.c          handling_one.c        mutsara.c
  changingDir_handling_getzAl.c  help__1.c             Paper.c
  checkvsynt.c                   hsh                   pfhandling.c
  cmd.c                          intsiggetz.c          README.md
  envhandleone.c                 ita_c.c               shell.h
  envhandletwo.c                 kumisa.c              shell_Loops.c
  err_get.c                      Librarystdhandling.c  str001handling.c
  errhandling001.c               line.c                str002handling.c
  errhandling002.c               ls_01_handling.c      str003handling.c
  extrem_var_chek.c              ls1handling.c
  $ 

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages