Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
How does Linux terminal commands get parse?

In the terminal, or shell, on Linux machines you can type certain commands with options, flags, arguments, etc.

cd /home/user -p

and then when you run the command it get parse and something happen.

I want to make a JavaScript (NodeJS) parser that simply take a string and parse it into tokens so I can use the tokens and execute certain functions how they should execute. Sort of like how Linux shell work.

I was thinking something like this might work.

{
    name: "cd",
    flags: ["p"],
    args: ["/home/user"],
}

I never done any type of parsing. How would I go about creating my goal? Is there any better way to do it or any libraries that does this for you?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda