Functions in bashrc. Another simple thing
In .bashrc you can describe functions.
Why am I? If you are missing alias, it is not necessary to write aone-line script.
You can add, for example, a function in .bashrc to get an external ip address. On the command line, wanip will show your external ip address. And it’s better to put it in a separate file, for this, add .bash_func to the .bashrc file name, where we will write the functions.
Why am I? If you are missing alias, it is not necessary to write a
You can add, for example, a function in .bashrc to get an external ip address. On the command line, wanip will show your external ip address. And it’s better to put it in a separate file, for this, add .bash_func to the .bashrc file name, where we will write the functions.
wanip() {
wget -q -O - checkip.dyndns.com | awk '{print $6}'| sed 's/<.*>//'
}
if [ -f ~/.bash_func ]; then
. ~/.bash_func
fi