I am playing with the GitHub Hubot and I am trying to run a bash script inside my robotic work.
I managed to execute my script, but I can not get it to work if I add some arguments to this script.
{ spawn } = require 'child_process'
s = spawn './myScript.sh' + " url" + " title" <------- doesn't work due to args
s = spawn './myScript.sh' <------- alright without args
s.stdout.on 'data', ( data ) -> console.log "Output: #{ data }"
s.stderr.on 'data', ( data ) -> console.error "Error: #{ data }"
s.on 'close', -> console.log "'s' has finished executing."
How to pass arguments to my script?
thanks for the help
eouti source
share