sintaxis más genérica para funciones

This commit is contained in:
fauno 2024-07-03 10:49:30 -03:00
parent d35e211f49
commit 0c8fe576cd

View File

@ -9,7 +9,7 @@ ETCHOSTS="/etc/hosts"
# Added at the end of each line in the hosts file.
COMMENT="# Managed by tinc ${NETNAME}"
function mac_to_address () {
mac_to_address() {
# Turns every octet into a positional variable.
# $1 = 12:3:56:78:9a → $1 = 12, $2 = 3, $3 = 56 …
local IFS=:; set $1