I write some scripting and I want to make it work on Linux and Mac. The problem is, that "Implementations of sed, readlink, zcat, etc. are different on OS X and Linux."
So I tried THIS approach, but for me alias command does not work as I expect. Here is simple script 'a':
$cat a
alias readlink=gredlink
readlink --help
and the result ...
$./a
readlink: illegal option -- -
usage: readlink [-n] [file ...]
Could anyone explain me what's under the curtain, and is there workaround?
Using OSX Yosemite 10.10.5 It's the same with the bash included with the OS as well with "GNU bash, version 4.3.42(1)-release (x86_64-apple-darwin14.5.0)"