ruby 调用Linux 系统环境变量,比如
#!/usr/bin/env ruby
user = ENV['USER']
hostname = ENV['HOSTNAME']
puts "current user is #{user}"
puts "current hostname is #{hostname}"
ruby 调用Linux 系统环境变量,比如
#!/usr/bin/env ruby
user = ENV['USER']
hostname = ENV['HOSTNAME']
puts "current user is #{user}"
puts "current hostname is #{hostname}"