Which would be the equivalent of this Ruby code?
open("| pbcopy", "w") do |io|
io.write(str)
end
Which would be the equivalent of this Ruby code?
open("| pbcopy", "w") do |io|
io.write(str)
end
I think it’s:
Process.run("pbcopy") do |process|
process.input.print "hello world!"
end
Neat! Thanks Ary.