I am catching emails to "script@localhost" with /etc/aliases:
script: root,"|/path-to-my-script"
this gets an email on STDIN and I am parsing and passing it to other scripts.
#!/usr/bin/ruby
email = ARGF.read
...parse...parse-some-more...
system("/my-other-script.sh #{email.todo}")
the question is - what would be a best way to capture the STDOUT of my-other-script.sh for troubleshooting?