diff --git a/files/root/.config/bash/bashrc-includes.d/system_linux_func_reverse_fqdn b/files/root/.config/bash/bashrc-includes.d/system_linux_func_reverse_fqdn new file mode 100644 index 0000000..ceb6193 --- /dev/null +++ b/files/root/.config/bash/bashrc-includes.d/system_linux_func_reverse_fqdn @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: MIT +function reverse_fqdn() { + python3 -c 'import sys; arg_list = sys.argv[1].split("."); arg_list.reverse(); print(".".join(arg_list))' "${1}" +} diff --git a/files/root/.config/bash/bashrc-includes.d/system_linux_func_slash_fqdn b/files/root/.config/bash/bashrc-includes.d/system_linux_func_slash_fqdn new file mode 100644 index 0000000..33a3c0b --- /dev/null +++ b/files/root/.config/bash/bashrc-includes.d/system_linux_func_slash_fqdn @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: MIT +function slash_fqdn() { + python3 -c 'import sys; arg_list = sys.argv[1].split("."); arg_list.reverse(); print("/".join(arg_list))' "${1}" +}