Coder Social home page Coder Social logo

projet-js's Introduction

Projet-JS

main.js

This code is a test of a shell program in JavaScript. It manages the modifications of the current file and print it on the terminal as well as other commands listed just below.

The valid commands :

lp : Listing of all running processes

cd : Change the current directory, to the previous one, a next one... (example : /mnt/c/../c/.. is correctly managed)

bing [-k|-p|-c] : Stopping, killing, or continuing a process

keep : Detaching a process with the 'keep ' command (we're having some issues with this one as the processes don't stay in background as soon as we close the terminal which was launching them, but we managed to put them in background with the nohup <command> & command)

<name_program> ! : Run a command in the background

all the other bash/sh commands are also available and managed

The code is infinitly waiting for incomming data from the terminal (process.stdin.on()). This is causing issues to implement the Ctrl+P required command as the program isn't waiting for just one keyboard key to be pressed. If so, each key pressed will try to launch a command, which will be impossible to manage to read string from the terminal.

Launching this code

To start to use this program, you need to follow these steps :

  • download the Main.js file

  • open a Linux terminal in the repository of the downloaded file

  • run node main.js

projet-js's People

Contributors

julie-mg 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.