Here is a small snippet to find outgoing IP of your Linux box.
1. To find the outgoing internal IP only
2. To find the outgoing internal IP along with interface.
3. In-case if your system is connected to Internet, to find the outgoing external IP
Note: In case if your system having public IP assigned then there is no difference between outgoing internal IP and external IP (both are same).