Skip to content

Instantly share code, notes, and snippets.

@JburkeRSAC
Created September 16, 2015 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JburkeRSAC/fe81f4b48e02aace0153 to your computer and use it in GitHub Desktop.
Save JburkeRSAC/fe81f4b48e02aace0153 to your computer and use it in GitHub Desktop.
IP to var
#!/bin/bash
ip="$(ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment