-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxip
More file actions
executable file
·36 lines (33 loc) · 1.46 KB
/
xip
File metadata and controls
executable file
·36 lines (33 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
#
# ############################################################################
# Project: scripts (none)
# File...: xip
# Created: Monday, 2022/01/31 - 20:28:15
# Author.: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Last Modified: Monday, 2024/12/09 - 17:41:41
# Modified By..: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Version: 1.0.3.129
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Description:
# >
# ############################################################################
# HISTORY:
#
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~
# shellcheck disable=SC1090
source "$xSHELL_INIT"
use args utils xiplib
xrequirements lshw grep aw tr ip curl
xarg --id -i,--interfaces --var action:iface --desc "available interfaces"
xarg --id -a,--all --var action:all --desc "detailed information"
xarg --id -e,--external-ip --var action:ext --desc "external IP address"
xarg --header "interfaces / IP information"
xrun --xreject-unknow --xversionrc --xcolors "$@"
case "$action" in
iface) echo -e "${_IFACES[*]}\n" ;;
all ) ip a | grep -A2 "$_FILTER" | grep -v "inet6\|link\|valid_lft" ;;
ext ) _getIP ;;
esac