def pipe_output (pipeto, str)
      case str
      when String
        #str = str.split "\n"
        # okay
      when Array
        str = str.join "\n"
      end
      #pipeto = '/usr/sbin/sendmail -t'
      #pipeto = %q{mail -s "my title" rahul}
      if pipeto != nil  # i was taking pipeto from a hash, so checking
        proc = IO.popen(pipeto, "w+")
        proc.puts str
        proc.close_write
        proc.readlines
      end
    end
def pipe_output (pipeto, str)
      case str
      when String
        #str = str.split "\n"
        # okay
      when Array
        str = str.join "\n"
      end
      #pipeto = '/usr/sbin/sendmail -t'
      #pipeto = %q{mail -s "my title" rahul}
      if pipeto != nil  # i was taking pipeto from a hash, so checking
        proc = IO.popen(pipeto, "w+")
        proc.puts str
        proc.close_write
        proc.readlines
      end
    end
returns array of lines after running command on string passed
 TODO: need to close pipe other's we'll have a process lying
 around forever.