[prev in list] [next in list] [prev in thread] [next in thread]
List: opensuse
Subject: Re: Can you help with rename files? (a bit offtopic, sorry)
From: "David C. Rankin" <drankinatty () suddenlinkmail ! com>
Date: 2023-12-24 0:41:59
Message-ID: 79e19068-9ed2-4689-8155-996dbd5c434a () suddenlinkmail ! com
[Download RAW message or body]
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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic