Created
August 3, 2016 19:54
-
-
Save loranbriggs/5170d416f80b7ab45383ba86fd215cbb to your computer and use it in GitHub Desktop.
mkalias, a funtion to add to bashrc to create aliases from the command line
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
function mkalias () { | |
if [[ $1 && $2 ]] | |
then | |
echo -e "alias $1=\'$2\'" >> ~/.bash_aliases | |
alias $1=$2 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment