Skip to content

Instantly share code, notes, and snippets.

@bluebanboom
Created June 18, 2013 03:42
Show Gist options
  • Save bluebanboom/5802540 to your computer and use it in GitHub Desktop.
Save bluebanboom/5802540 to your computer and use it in GitHub Desktop.
show ip address on login screen
#!/bin/bash
ipaddr=$(ifconfig | sed -ne 's/ *inet addr:\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\) *B.*/\1/p')
echo $'\x1b\x5b\x48\x1b\x5b\x32\x4a\x0a''Arch Linux \r ['$ipaddr'] (\n) (\l)' > /etc/issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment