Giter VIP home page Giter VIP logo

shell's Introduction

Shell

Shell должен представлять из себя программу с частичной функциональностью sh, bash или cmd. При запуске программа выводит приглашение и ожидает ввода одной из команд.

Базовый функционал

  1. ls. Вывести список файлов и директорий для текущей директории.
  2. pwd. Вывести полный путь для текущей директории.
  3. cd <путь>. Переход по относительному или абсолютному пути.
  4. cp <имя файла> <имя файла>. Скопировать файл.
  5. mv <имя файла> <имя файла>. Переместить файл.
  6. rm <имя файла>. Удалить файл.
  7. rmdir <имя директории>. Удалить директорию в случае, если она пуста.
  8. mkdir <имя директории>. Создать директорию, если ее не было. Все пути могут быть полными или относительными. Программа должна проверять возможность выполнения операций (существование и несуществование файлов), и сообщать об ошибках в случае их возникновения.

Бонусы

  • Реализация запуска исполняемых файлов или пайпов

Запуск исполняемых файлов

run <путь к исполняемому файлу> <аргументы>. Запускаем файл, печатаем его вывод stdout и stderr, ожидаем завершения перед вводом след. команды. Пример: $ run echo ‘hello’ hello

  • Тесты

Запуск

Сначала клонируйте репозиторий

git clone https://github.com/alliseeisgold/review_1.git

Установите нужные библиотеки

pip install -r requirements.txt

Запуск

python3 main.py

shell's People

Contributors

alexander-deb69 avatar alliseeisgold 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.