I want to edit the bashrc file to have a simple function called \"myip\" to run. As you might guess, the function myip prints only my internal IP address of my machine.
In case of eth0, the following works for me. Try to tweak it with the same logic.
ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'