#!/bin/bash IP=$(ip add show | grep -A 1 eth | sed -n 's/^.*inet \([^ ]*\) .*$/\1/p'); echo $IP | sed 's%/.*$%%'