![]() Registered Member ![]()
|
I want to learn how to pass a series of filenames with spaces from a kde service menu to a bash script in such a way that the script won't confuse white spaces with delimiters.
I've tried all the usual options (%F, %U, etc.) but with no success. Any help will be welcome. Although I want to understand it in principle, the specific script in this case is the following:
|
![]() Administrator ![]()
|
I am not sure entirely, but if spaces are causing an issue here, you may find it helpful to place quotes around the %f / %F / %u / %U markers you are using in your service menu *.desktop file.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I am already doing that.
![]() Thanks anyway. |
![]() Administrator ![]()
|
Hm, if I interpret your original post correctly, it could be the quotes causing the problem. Have you tried without them?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
If I am not mistaken, that wouldn't work either.
Suppose that I select the following files: /home/darwin/a b.txt /home/darwin/a.txt "%F" would be "/home/darwin/a b.txt /home/darwin/a.txt" %F would be "/home/darwin/a" which doesn't exist. |
![]() Administrator ![]()
|
I'm not sure exactly, but I think KDE programatically launches Service Menus, so the quotes are not needed (as the arguments are handled differently from shells).
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Damn!
For years I was absolutely sure that that wouldn't work. Where the hell did you get that information from? A million thanks!!!!! ![]() ![]() ![]() ![]() |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft