Browse Source

Merge branch 'master' of github.com:10sr/dotfiles

pull/1/head
10sr 12 years ago
parent
commit
450196d59a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      bashrc

+ 2
- 2
bashrc View File

@@ -548,8 +548,8 @@ __my_battery_status(){
alias bat='__my_battery_status %s\\n'

ip-address(){
test type ifconfig >/dev/null 2>&1 || return 1
local ip=$(LANG=C ifconfig | \grep --color=never "inet " | \grep --color=never -v "127.0.0.1" | awk '{print $2}')
type ip >/dev/null 2>&1 || return 1
local ip=$(LANG=C ip addr show scope global | \grep --color=never --only-matching 'inet [^ ]*' | cut -d " " -f 2)
test -n "$ip" && printf $1 $ip
}



Loading…
Cancel
Save