Created
April 23, 2019 12:51
-
-
Save fukaoi/b3eebcb208cb0cbe2bcc8c700d5b7af9 to your computer and use it in GitHub Desktop.
node.js to crystal named pipe
This file contains hidden or 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
require "io" | |
require "json" | |
io = IO::Memory.new | |
Process.run("cat ~/Work/hogepipe", shell: true, output: io) | |
p data = io.to_s.chomp | |
p JSON.parse(data)["name"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment