-
-
Save luisadha/5ad713f66919364169a86814e5a1660d to your computer and use it in GitHub Desktop.
Cu is a function referring to gnu coreutils for easier and more efficient use.
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
[ -z "$PS1" ] && return # bashcheck is only called via function | |
cu() | |
{ | |
local program="$1" | |
local help="$*"; | |
if [ -z "$program" ]; then echo "cu: Try \`cu --help' "; exit 1 | |
elif [ "$program" == "--help" ]; then coreutils --help; | |
elif [ "$program" == "--version" ]; then coreutils --version; | |
else eval cmd=--coreutils-prog=$1; coreutils $cmd $help; fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment