Skip to content

Instantly share code, notes, and snippets.

@rphillips
Created December 4, 2012 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rphillips/d0ba9abc625d86949ecf to your computer and use it in GitHub Desktop.
Save rphillips/d0ba9abc625d86949ecf to your computer and use it in GitHub Desktop.
local child = require('childprocess')
local timer = require('timer')
local ch = child.spawn('bash', {'/Users/ryan.phillips/test.sh'}, {})
ch.stdout:on('data', function(data)
p(data)
end)
ch.stderr:on('data', function(data)
p(data)
end)
timer.setTimeout(20000, function()
process.exit()
end)
@rphillips
Copy link
Author

!/bin/sh

while true ; do
date
sleep 10
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment