diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-11-06 08:25:12 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-11-06 08:25:12 +0800 |
commit | a6061b61fa52b5c810c4214cc0682f4b21f1592c (patch) | |
tree | 1429ad3771a0387fc2fe073aa5ea19a68e6020dd /alias | |
parent | 69b2b3532b22898c7df8c5ee43a98d095bab67c2 (diff) |
Update
Diffstat (limited to 'alias')
-rw-r--r-- | alias | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -564,3 +564,10 @@ vvv() { | |||
564 | echo "restarting vim..."; | 564 | echo "restarting vim..."; |
565 | done | 565 | done |
566 | } | 566 | } |
567 | |||
568 | ip.neigh() { | ||
569 | INTERFACES=$(ifconfig | sed -nE 's/^([^ :]+).*$/\1/p') | ||
570 | test -z "$1" && echo $INTERFACES && return 0 | ||
571 | |||
572 | ifconfig | sed -nE "/^${1}/,/^$/ s/^ +inet ([0-9.]+) .*$/\1/p" | ||
573 | } | ||