base_role/files/find_skels_to_update.sh
embed@git.macaw.me b50fd16591 first
2024-01-06 01:38:28 +00:00

11 lines
281 B
Bash

#!/bin/bash
filename="$1"
for homedir in /home/*; do
if cmp "/etc/skel/$filename" "$homedir/$filename" &>/dev/null; then
owner_group=$(find $homedir -maxdepth 0 -printf '%u:%g')
echo "$filename:$homedir:${owner_group%:*}:${owner_group#*:}"
fi
done