Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

167
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda