Giter VIP home page Giter VIP logo

holbertonschool-simple_shell's Introduction


Logo

Simple Shell

Recreate a Simple Shell in C
Explore the docs »

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Examples
  5. Flowchart
  6. Contact

About The Project

This is a mandatory project for Holberton School made by Juan Matias Rossi from cohort 18. This project is about recreate or build a command intepreter similar to linux shell. This recreation can only take one command per usage and can't process special characters: ", ', `, \, *, &, #.

(back to top)

Getting Started

Simple shell is a interpreter command-line between kernel and the user mode for it can use the resources of the Operative System. This recreation tokenize the input given into strings, checks the permission of the paths/files and executes the command. This requieres at least Ubuntu 14.04 LTS and gcc 4.8.4.

Clone the repository

git clone https://github.com/SchneiderSix/holbertonschool-simple_shell.git

Use these flags if you want to compile

gcc -Wall -Werror -Wextra -pedantic -std=gnu89

Compile with every .c and the header from this repo (you can add your files here if you want)

gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c nice_header.h

Execute the built executable file

./a.out

You can read the man file just like this

man ./man_1_simple_shell

(back to top)

Usage

You can use this recreation in "Non-interactive mode" or "Interactive mode", remember "this recreation can only take one command per usage and can't process special characters: ", ', `, \, *, &, #.". You can close the program writing exit or pressing ctrl + D.

  • Interactive mode Execute the ./a.out file and write the input.

  • Non-interactive mode Use echo the command wanted and pipe it with the ./a.out file, for example echo "ls" | ./a.out.

(back to top)

Flowchart

flowchart

(back to top)

Examples

Interactive mode ls intls

Interactive mode pwd intpwd

Non-interactive mode ls nonintls

Non-interactive mode pwd nointpwd

(back to top)

Contact

Project Link: https://github.com/SchneiderSix/holbertonschool-simple_shell

(back to top)

holbertonschool-simple_shell's People

Contributors

schneidersix avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.