Skip to content

Instantly share code, notes, and snippets.

@florianleibert
Created October 25, 2013 17:21
Show Gist options
  • Save florianleibert/7158377 to your computer and use it in GitHub Desktop.
Save florianleibert/7158377 to your computer and use it in GitHub Desktop.
#!/bin/bash
ip=`ifconfig eth0|grep -o -e "inet addr:[0-9\.]*"|sed 's/.*://g'`
name=`hostname`
echo $ip $name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment