S
Stefan Gremm
Hello,
first excuse me my bad english.
i have write a little send_mail script. now i pipe the messagetext from
another program, like cat /var/mailtext| send-mail.rb
the program source:
smtp_message = ""
temp = $stdin
temp.each do |f|
smtp_message += f
end
this is runing very well, but when no text is in the pipe, the program
is waiting for input.
my question is, how can i ask, if text in $stdin, without the program is
waitung for input.
ciao
Stefan
first excuse me my bad english.
i have write a little send_mail script. now i pipe the messagetext from
another program, like cat /var/mailtext| send-mail.rb
the program source:
smtp_message = ""
temp = $stdin
temp.each do |f|
smtp_message += f
end
this is runing very well, but when no text is in the pipe, the program
is waiting for input.
my question is, how can i ask, if text in $stdin, without the program is
waitung for input.
ciao
Stefan