Created
March 17, 2016 04:02
-
-
Save nmcspadden/1db5ab3dd4f71a9a7c02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paths_file = File.readlines('/etc/paths').map(&:strip) | |
[ | |
'/opt/path/to/A', | |
'/opt/path/to/B', | |
].each do|path| | |
paths_file.unshift(path) unless paths_file.include?(path) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment