Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

136
Views
How do I make a NodeJS Script to do something like os.system on Python?

In Python Script, I can simply make it like this:

import os
import asyncio

async def do_something():
    os.system("pip list")
    
asyncio.run(do_something())

But what about on JavaScript/NodeJS? I see one module named 'os' too in there, but how do I use it?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use the child_process library to run bash commands. Example below.

import { exec } from "child_process";


exec("pip list", (error, stdout, stderr) => {
  console.log(stdout);
})
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!