zsh: add hosthost function
This commit is contained in:
parent
92c4fed0b5
commit
193c737232
1 changed files with 10 additions and 0 deletions
|
@ -14,6 +14,16 @@ function xsi() {
|
|||
}
|
||||
|
||||
function whed() {
|
||||
local script
|
||||
script=$(which "$1")
|
||||
[ -e "$script" ] && $EDITOR $(which "$script")
|
||||
}
|
||||
|
||||
function hosthost() {
|
||||
local ip
|
||||
ip=$(
|
||||
host -t A "$1" | awk '{print $4}' ||
|
||||
host -t AAAA "$1" | awk '{print $5}'
|
||||
)
|
||||
host "$ip" | awk '{print $5}' | sed 's/.$//'
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue