A
Ara.T.Howard
in linux i'd do something (un-tested) like:
def find_bin bin
bin = nil
path = ENV['PATH'].split File:ATH_SEPARATOR
path.each do |dir|
b = File::join dir, bin
return b if File::executable? b
end
bin
end
what would the equivalient be in windows? should the above work or do i need
to check some other env vars?
cheers.
-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
def find_bin bin
bin = nil
path = ENV['PATH'].split File:ATH_SEPARATOR
path.each do |dir|
b = File::join dir, bin
return b if File::executable? b
end
bin
end
what would the equivalient be in windows? should the above work or do i need
to check some other env vars?
cheers.
-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================