[dolphin] [Bug 428180] A shell script to rename files, which works perfectly in terminal, leaves a leading space in filename

David Greengas bugzilla_noreply at kde.org
Fri Oct 30 21:23:44 GMT 2020


https://bugs.kde.org/show_bug.cgi?id=428180

--- Comment #6 from David Greengas <dave.greengas at gmail.com> ---
This is what I get when I run your suggested for loop
rename: not enough arguments
Try 'rename --help' for more information.
rename: not enough arguments
Try 'rename --help' for more information.

This returns 1. This is consistent with what I am getting when running as a
service from Dolphin.

I was able to use a similar service file to the one you suggested and loop
through the files correctly and call the file command against them.

In order to help with debugging the service definition, I used the logger
command to log output the journald. Then I was able to tail the journal via
journalctl -f and watch the output from the service being called.

$? is a special variable that has the return code from the last command (in ZSH
and BASH). I also used logger to log the return code from the rename command.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list