Created
June 18, 2013 03:42
-
-
Save bluebanboom/5802540 to your computer and use it in GitHub Desktop.
show ip address on login screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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