Commit 05c2e55e authored by epsi sayidina's avatar epsi sayidina

pipe and fork

parent b373ac5f
#!/usr/bin/ruby
# http://ruby-doc.org/core-1.8.7/IO.html#method-c-popen
def generated_output(stdin)
path = __dir__+ "/../assets"
cmdin = 'conky -c ' + path + '/conky.lua'
IO.popen(cmdin, "r") do |f|
while f do
stdin.puts f.gets
end
f.close()
end
end
cmdout = 'less' # or 'dzen2'
IO.popen(cmdout, "w") do |f|
generated_output(f)
f.close()
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment