Created
September 18, 2011 21:25
-
-
Save palopezv/1225568 to your computer and use it in GitHub Desktop.
coreutils aliases on non GNU systems (bash func)
This file contains hidden or 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
make_gnu_aliases() { | |
local cmd | |
local gcmd | |
for gcmd in /opt/csw/bin/g* | |
do | |
cmd=${gcmd##*/g} | |
if [[ "$(type -p ${cmd})" ]]; then | |
alias ${cmd}=$(type -p g${cmd} ${cmd} | head -1) | |
fi | |
done | |
} | |
make_gnu_aliases |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment