Skip to content

Instantly share code, notes, and snippets.

@lacostenycoder
Created January 16, 2016 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lacostenycoder/ac3f9e70c7ad7d17c495 to your computer and use it in GitHub Desktop.
Save lacostenycoder/ac3f9e70c7ad7d17c495 to your computer and use it in GitHub Desktop.
Ruby Easy PATH Variable Output

Simple way to quickly see what's in your current $PATH variable.

#!/usr/bin/env ruby
cmd = 'echo $PATH'
value = %x[ #{cmd} ]
path = %x[ #{cmd} ].split(':')
path.each{|line| puts line}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment