Giter VIP home page Giter VIP logo

simple_shell's Introduction

  • 👋 Hi, I’m @Vilyanare

I'm currently interested in Game and Renderer engine design.

I would love to work on any project with a C++ base but more specifically something in the game development area.

Email: [email protected]

simple_shell's People

Contributors

jacobbhartman avatar vilyanare avatar

Watchers

 avatar

simple_shell's Issues

Builtins

Struct and function pointers plus search function for builtins

Our error handling is different from sh

when you type a non-existent command with arguments, it should only print the command in the error (and not all of the arguments!)
The user types in:
hello 5 forty

The behavior we want:
sh: 1: hello: not found
The behavior we get:
./shell: 1: hello 5 forty: not found

Task #2 - Simple Shell

DUMONT:
Simple shell
Non-interactive mode
Handle errors.

HARTMAN:
Write a UNIX command line interpreter.
Usage: simple_shell

Your Shell should:

  • - Display a prompt and wait for the user to type a command. A command line always ends with a new line.
  • - The prompt is displayed again each time a command has been executed.
  • - The command lines are simple, no semi-columns, no pipes, no redirections or any other advanced features.
  • - The command lines are made only of one word. No arguments will be passed to programs.
  • - If an executable cannot be found, print an error message and display the prompt again.
  • - Handle errors.
  • - You have to handle the “end of file” condition (Ctrl+D)

You don’t have to:

  • use the PATH
  • implement built-ins
  • handle special characters : ", ', `, , *, &, #
  • be able to move the cursor
  • handle commands with arguments

SMALL printf

Strings decimal
_fprintf for stderr
_printf(int, char *s, ...) for stdout
_printf(1, "hello")
_printf(2, "error")

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.