Windoze equivalent inserted below :)

On 7/1/06, ara.t.howard / noaa.gov <ara.t.howard / noaa.gov> wrote:
>
>    fortytwo :~ > cat a.rb
>    require 'rbconfig'
>    require 'tempfile'
>
>    def console command
>      arch = Config::CONFIG['arch']
>
>      unless arch =~ %r/win/i
>        tmp = Tempfile.new Process.pid.to_s
>        tmp << command
>        tmp << "\n"
>        tmp << "bash"
>        tmp << "\n"
>        tmp.close
>        begin
>          system "xterm -e 'bash -l -i #{ tmp.path }'"
>        ensure
>          tmp.close!
>        end
>      else
          system "start cmd /k #{command}"
>      end
>    end
>
>    console 'date'
>

Regards,
Sean