Skip to content

Instantly share code, notes, and snippets.

@SomeKittens
Last active December 16, 2015 01:19
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SomeKittens/5354737 to your computer and use it in GitHub Desktop.
Save SomeKittens/5354737 to your computer and use it in GitHub Desktop.
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