0

I am designing a javascript utility which needs to grep a password file ('ypcat passwd | grep ') in Unix. PERL uses "backtick" or System to run the command line. Python uses os.system. Is there a similar method in javascript?

2 Answers2

0

Yes sir there is https://nodejs.org/docs/latest/api/child_process.html It's child_process.exec()

bel3atar
  • 913
  • 4
  • 6
0

I don't believe there is a similar method within native JavaScript, but you may be able to achieve this using NodeJS.

Check this out, https://nodejs.org/api/os.html