This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
((!EUID)) || exec sudo "$0" "$@" # Addicted to OR-logic | |
declare -A src_dst_pair src_dst_old; # dictionaries -- the older one not being used | |
oops(){ printf '%b\n' "oOpsS!\t$1">&2; exit "${2:-1}"; } | |
## oldlist file | |
## Gets the contents of a legacy list. | |
oldlist() { | |
local arr i s d; | |
awk '/^#BEGIN-log#/ {flag=1; next} /^#END-log#/ {flag=0} flag' "$1" | mapfile arr |