0
我趕上電子郵件,「劇本@ localhost」的使用/ etc/aliases中:如何捕獲從Ruby調用的shell腳本的輸出?
script: root,"|/path-to-my-script"
這沾到標準輸入電子郵件和我解析,並把它傳遞給其他腳本。
#!/usr/bin/ruby
email = ARGF.read
...parse...parse-some-more...
system("/my-other-script.sh #{email.todo}")
什麼是捕捉my-other-script.sh
標準輸出的故障排除最佳方式?