{
remvHeaders='s/==+/\'$'\n''/g';
echo 'Current status of TM destinations:';
destInfo=$(tmutil destinationinfo | \
sed 's/^> //' | \
tr '\n' '\;' | \
sed -E 's/ +:/:/g' | \
sed -E "$remvHeaders");
defaults read /Library/Preferences/com.apple.TimeMachine.plist Destinations | \
egrep -v ',$' | \
sed -E -e ':a' -e 'N' -e '$!ba' -e 's/\n[[:blank:]]+"/ /g' | \
sed -E 's/^[[:blank:]]+//' | \
fgrep -e DestinationID -e SnapshotDates | \
sed -e ':a' -e 'N' -e '$!ba' -e 's/;\n/;/g' | \
sed 's/( /"/' | \
while read -r theLine; do
destID=$(echo "$theLine" | \
cut -d\" -f2);
snapDate=$(echo "$theLine" | \
cut -d\" -f4);
echo $destID $snapDate$(echo "$destInfo" | \
fgrep "$destID" | \
sed 's/;ID.*$//' | \
sed -E -e 's/;[^: ]+: / /g');
done | sort -rn
}