Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> `ls -l "/usr/local/etc/git-completion.bash"`
- => "-rwxrwxr-x 1 root admin 44883 11 Oct 2009 /usr/local/etc/git-completion.bash\n"
- >> `whoami`
- => "ben\n"
- >> `groups ben`.split(' ').include? 'admin'
- => true
- >> File.writable? "/usr/local/etc/git-completion.bash"
- => false
- >> File.writable_real? "/usr/local/etc/git-completion.bash"
- => true
- >> File.open("/usr/local/etc/git-completion.bash", "a") { puts "opened for writing OK" }
- opened for writing OK
- => nil
- >> `uname -a`
- => "Darwin hat.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386\n"
Add Comment
Please, Sign In to add comment