node.js - How to recv output and handle error in spawnSync -


i new in node-js. trying execute linux command using spawnsync/execsync, confused how recv output handle error.

e.g: cat test.txt

i want execute above command, recv output in object/file. if file not exist recv exception in buffer.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -