Giter Club home page Giter Club logo

minishell_'s Introduction

Minishell_

The objective of this project is for you to create a simple shell. Yes, your own little bash or zsh. You will learn a lot about processes and file descriptors.

Contributors:

Subject:

  • Not use more than one global variable, think about it and be ready to explain why you do it.

  • Show a prompt when waiting for a new command.

  • Search and launch the right executable (based on the PATH variable or by using relative or absolute path) like in bash.

  • It must implement the builtins like in bash:

    - echo with option ’-n’
    
    - cd with only a relative or absolute path
    
    - pwd without any options
    
    - export without any options
    
    - unset without any options
    
    - env without any options and any arguments
    
    - exit without any options
    
  • ; in the command should separate commands like in bash

  • and " should work like in bash except for multiline commands

  • Redirections < > “>>” should work like in bash except for file descriptor aggregation

  • Pipes | should work like in bash except for multiline commands

  • Environment variables ($ followed by characters) should work like in bash

  • $? should work like in bash

  • ctrl-C, ctrl-D and ctrl-\ should have the same result as in bash

  • Use up and down arrows to navigate through the command using termcap (mandatory) history which we will then be able to edit (at least like we can for classic lines) if we feel like it (the line, not the history).

External functions:

printf, malloc, free, write, open, read, close, fork, wait, waitpid, wait3, wait4, signal, kill,
exit, getcwd, chdir, stat, lstat, fstat, execve, dup, dup2, pipe, opendir, readdir, closedir,
strerror, errno, isatty, ttyname, ttyslot, ioctl, getenv, tcsetattr, tcgetattr, tgetent, tgetflag,
tgetnum, tgetstr, tgoto, tputs

How to use?

  1. make
  2. ./minishell
  3. Run commands

minishell_'s People

Contributors

mojahid-belaman avatar nab-khaoula avatar

Watchers

James Cloos 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.