24 Dec
2023
24 Dec
'23
00:41
On 12/23/23 18:16, David C. Rankin wrote:
or if in multiple subdirectories feed a while loop with find:
while read -r fname; do mv "$fname" "${fname#*_}"; done < <(find the/path -type f -name "*IMG*.png")
And if for some reason you are using POSIX shell instead of bash, just pipe the find output to the loop instead of using process substitution, e.g. find the/path -type f -name "*IMG*.png" | while read -r fname; do mv "$fname" "${fname#*_}"; done -- David C. Rankin, J.D.,P.E.