When you install the OS, by default there are 21 aliases in ~/.bashrc, so we don't count these - only the ones you wrote yourself. How many do you have? Mine are 241 at the moment.
You can use this script, even use it as an alias to count your aliases number. If you make an alias of it, it will be included in the final number.
This script is useful, if you have a large number of aliases. If it returns a negative number, open ~/.bashrc and scroll to its bottom. There you should see aliases that come with the distro installation by default. Count the number of these aliases and replace "21" with yours. This will change the script in a way to tell you how many aliases of your own you have.
You can use this script, even use it as an alias to count your aliases number. If you make an alias of it, it will be included in the final number.
Code:
alias-count-number-of-aliases.sh
Code:
#!/usr/bin/env bash
num1=$(grep -o "alias " .bashrc | wc -l)
result=$(($num1 - 21))
echo $result
Last edited: