Skip to content

djimrangarleita/simple_shell

Repository files navigation

0 x 16. C - Simple Shell

Overview

This is a custom implementation of a UNIX shell alias simple shell, its a requirement to be completed in the first sprint in the ALX school SE program. A shell is basically a command-line interpretor for Linux. It acts as an interface between the user and the kernel. It facilitates execution of different commands.

Requirements

General

  1. Allowed editors: vim, vi,emacs.
  2. All files were compiled on Ubuntu 20.04 LTS using gcc, using the options * -Wall -Werror -Wextra -pedantic -std=gnu89*
  3. Betty coding standard

Fetaures

In our simple shell we tried to incoporate significant functions so as tohave as to ensure that the shell functionality is as smooth as possible. These functions are the following;

. access: This function checks user permission for execetuing files. . execve: It executes programs that are specified by the user. . exit: Exits the shell . fork: Creates child parent processes for command execetuion. . perror: Displays the error message. . stat: Gets information about files. . wait: Suspending execution until a child process is complete. . strtok: Will tokenize strings into a sequence of tokens . execres: Holds the exit status of a child process executed by the shell

Mandatory tasks

0.README.md file, AUTHORS 1.Make Betty Proud 2.Simple shell 0.1 3.Simple shell 0.2 4.Simple shell 0.3 5.Simple shell 0.4 6 Simple shell 1.0 7.Simple shell 0.1.1

Advanced tasks

8.Simple shell 0.2.1 9.Exit,exit status, 10.setenv,unsetenv 11.cd 12.; 13 && and || 14.alias 15.$? and $$ 16.#

Usage example.

To explain the simple shell usage and functionality, I want you to consider this scenario:when a user enters 'pwd' the shellinterprets and executes the 'pwd' command, this will ensure the user interracts with the system seamlessly.

How to Run

To run the simple_shell,follow the steps below:

1.Clone the repository into your local machine. 2.Compile the program using a C compiler(e.g., gcc) 3.Execute the compiled binary.

*$ gcc -o simple shell *.c*
*$ ./simple shell*

I think now you have a basic idea of how our simple shell works. If you have any questions or feedback, please reach out to the project ocontributors. Happy coding!

Authors

Djimra NGARLEITA [email protected] GEORGE Oburu [email protected]

License

This is an open source project, so there is no special licenses , feel free to explore, modify it as per your needs, redistribute the simple shell program.

About

ALX simple shell project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages