Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Ever wanted to yell at your terminal? Now you can!
#!/bin/bash
#Needed to provide alias expansion (so we can use those aliases after the script's finished)
shopt -s expand_aliases
while read x;
do
a=`echo $x | tr '[:lower:]' '[:upper:]'`;
#Added because the script was picking up empty lines
if [ "$a" != '' ]
then
alias $a=$x;
fi
done < <(compgen -c)
#!/bin/bash
shopt -s expand_aliases
while read x;
do
a=`echo $x | tr '[:lower:]' '[:upper:]'`;
if [ "$a" != '' ]
then
unalias $a;
fi
done < <(compgen -c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment