You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We worked for a while to copy stdout and stderr instead of trying to format our console logs manually in Log methods. We were unsuccessful. I may have found what we're looking for in this stackoverflow question/answer:
Question:
In a node.js, I'd like to find a way to obtain the output of a Unix terminal command. Is there any way to do this?
function getCommandOutput(commandString){
// now how can I implement this function?
// getCommandOutput("ls") should print the terminal output of the shell command "ls"
}
Answer:
This is the method I'm using in a project I am currently working on.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We worked for a while to copy stdout and stderr instead of trying to format our console logs manually in Log methods. We were unsuccessful. I may have found what we're looking for in this stackoverflow question/answer:
Question:
Answer:
Beta Was this translation helpful? Give feedback.
All reactions