-
-
Save enebo/c3064050f41c9cfd5f070c6ee102ea89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enebo: ruby -I "subspawn-win32/lib" -I "subspawn/lib" -r 'subspawn' -r 'subspawn/replace-pty' -e 'm,s =PTY.open; p [m,s]; pid,j = SubSpawn.spawn(["cmd"], pty: s); sleep 5; m << "echo yes\n\r\nexit\r\n"; m.flush; p pid, j; p m.read(5); p Process.wait(pid); puts "done"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment