function get_default_iface_ipv4 : maj doc

This commit is contained in:
Gitouche 2021-09-24 10:14:28 +02:00
parent 72f38baa68
commit c3ef1f3c7f

View file

@ -96,7 +96,7 @@ check_valid_ipv4() {
get_default_iface_ipv4() {
# Call this function with the name of the variable
# you want to store the result in :
# default_iface_ipv4 myipv4
# get_default_iface_ipv4 myipv4
# See https://www.linuxjournal.com/content/return-values-bash-functions
local __resultvar=${1}
local __default_iface=$(awk '$2 == 00000000 { print $1 }' /proc/net/route)