To update signatures in /boot
I'd like to use find (GNU findutils) 4.6.0.
I know I can just loop and check if the signature matches with gpg, but I'd like to know how to use find with -newer
in the same directory and use the currently matched pattern somehow to test if file.img is not newer than file.img.sig. Can this be easily done?
i.e. something like:
sigs=(`find /boot -type f -iname '*.sig'`)
for sig in ${sigs[@]}; do
file=${sig%*.sig}
find /boot -type f -name "$file" -newer /boot -type f -name "$sig"
done
-newer "$sig"
? But your first line as well as yourfor
loop declaration will not work ... Also looping over find result with a for-loop is not what you should do... – pLumo Apr 08 '19 at 14:10