Update 2024-12-23 22:15 OpenBSD/amd64-t14
This commit is contained in:
parent
b86b992a6a
commit
e548ab67c8
25
.bin/network
Executable file
25
.bin/network
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
case "$arg" in
|
||||
status) status=1 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
_ifconfig() {
|
||||
[ -z "$_ifdata" ] \
|
||||
&& _ifdata="$(ifconfig)"
|
||||
echo "$_ifdata"
|
||||
}
|
||||
|
||||
_interfaces="$(_ifconfig | egrep "^[a-z]" | cut -d: -f1 | egrep -v "lo0|enc0|pflog0" | xargs)"
|
||||
|
||||
if [ -n "$status" ]
|
||||
then
|
||||
for _dev in $_interfaces
|
||||
do
|
||||
# something with awk
|
||||
done
|
||||
fi
|
Loading…
Reference in New Issue
Block a user