Guest User

Untitled

a guest
Feb 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. executables = ENV["PATH"].split(":").inject([]) { |execs, path_dir| execs += Dir[path_dir + '/*'] }
  2. mysql_executables = executables.select { |e| Pathname.new(e).basename.to_s =~ /^mysql/ && File.executable?(e) }.map { |p| File.expand_path(p) }
Add Comment
Please, Sign In to add comment