Giter Club home page Giter Club logo

operatingsystems_mybash's Introduction

Operating Systems Final Assignment, AUTh [2018]

Create my own version of linux Batch Shell.

This is an experimental application developed as part of the course "Operating Systems" assignment, that took place in the Department of Electrical & Computer Engineering at Aristotle University of Thessaloniki in 2018.

The goal is to create my version of linux Bash Shell. Where,

  • cd, help and quit are handled as Built-In functions.
  •    For other functions type @function_name @arguments. If you need more info, type man @function_name.
  • Improper space handle.
  • Redirection with > handle.
  • Redirection with < handle.
  • Two modes supported:
    • Interactive, when no arguments are given.
    • Batch, when 1 (one) argument (file) is given.
Makefile supports:
  • all, to make the object file,
  • clean, to delete it.
Valid instructions:
  • echo hello ; echo world ; echo true
  • echo hello && echo world && echo true
  • echo hello ; echo world && echo true
  • eco hello && echo world ; echo true
  • echo hello > file_1 > file_2 > file_3
  • wc -l < file_1 < file_2 < file_3     if file_1, file_2, file_3 exists
  • wc -l < file_1 > file_2        if file_1 exists
Invalid instructions:
  • Instruction(s) with piping ( | ). No error message, but the pipe symbol will be ignored.
  • Instruction(s) with 3 or more sequentially ampersands. (i.e echo hello &&& echo world)
  • Instruction(s) with 2 or more sequentially semicolons. (i.e echo hello ;; echo world)
  • Instruction(s) with more than 512 characters.
  • Other Build- In instruction(s) like: jobs, fg, bg etc.
  • NULL commands, like:
    • ;
    • &&
    • echo hello ; ; echo world
    • echo hello && && echo world
PS_1. At the naming of the files do not use 'name' or "name", just name. Otherwise the ' ' or " " will appear at the namefile.

  Proper usage: echo hello > file

  Improper usage: echo hello > 'file' or echo hello > "file"

PS_2. Maximum instructions = 250 (per line)


Execution

To execute the code, you first need to compile it using:

make all

and then run using:

./myshell [batchfile]

where the parameter is optional.


Status

As of the completion of the project, it will NOT be maintained. By no means should it ever be considered stable or safe to use, as it may contain incomplete parts, critical bugs and security vulnerabilities.


Support

Reach out to me:


License

License: MIT

operatingsystems_mybash's People

Contributors

mpalaourg 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.