pass arguments to alias bash


some grep alias:
g(){ grep \$1 /tmp/some_data.txt | sort -k1 | awk ' {print \$1 ,\"\t\", \$3 }';}

some mkdir alias:
mkcd() { mkdir -p -- "$1" && cd -P -- "$1"; }

put to:
vim ~/.bash_alias
source ~/.bash_alias

Leave a Reply

Your email address will not be published. Required fields are marked *