Ver a proveniência

fix ip-address

pull/1/head
10sr há 12 anos
ascendente
cometimento
9b677153a1
1 ficheiros alterados com 2 adições e 2 eliminações
  1. +2
    -2
      bashrc

+ 2
- 2
bashrc Ver ficheiro

@@ -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
}



Carregando…
Cancelar
Guardar