[dolphin] [Bug 428180] A shell script to rename files, which works perfectly in terminal, leaves a leading space in filename
Sadi
bugzilla_noreply at kde.org
Tue Oct 24 09:01:27 BST 2023
https://bugs.kde.org/show_bug.cgi?id=428180
--- Comment #13 from Sadi <sadiyumusak at gmail.com> ---
(In reply to fanzhuyifan from comment #12)
Oh, thank you so much!
I've revised my script as per your advice, and it's working perfectly now:
for filename in "${@}"; do
source_dir="$(dirname "$filename")"
source_file="$(basename "$filename")"
cd "$source_dir"
rename 's/[*\n<|>[\]]/ /g; s/\?//g; s/!//g; s/"//g; s/\\/ /g; s/ ,/,/g;
s/:/-/g; s/\s\s*/ /g; s/^\s\s*//; s/\s\s*\./\./g; '"s/'//g" "$source_file"
done
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the kfm-devel
mailing list