#!/bin/bash _IP=$(ip -4 addr | grep eth0 | grep inet | awk '{print $2}' | awk -F "/" '{print $1}') printf "My IP address is %s\n" "$_IP" | mail -s "Raspberry IP" oma_email@palvelin.com