Using GNU Command Line Tools on Mac Os X
Unlike Ubuntu shipped with GNU command line tools,Mac OS X shipped with the BSD version,which make me WTF when I encountered with some compatibility issues.Fortunately,it's quit easy to install gnu tools by using homebrew in Mac OS X and set them as default. First comes with the most important one – GNU coreutils,which contains the most essential commands like ls,cat and bla,bla…
brew install coreutils,and export PATH="$(brew --prefix)/opt/coreutils/libexec/gnubin:/usr/local/bin:$PATH",and add this alias to your .