Hello:
Because I have not known how to do it. :-(
I tried to directly put the moveTo, but it did not work either
for i in %F; do source=$i; target="${source/\/blog_web\//\/blog_src\/}";
zenity --info --text=$target; done;
The result is:
for i in %F; do source=$i; target=$(echo $source | sed
"s/\/blog_web\//\/blog_src\//g"); mv $source $target; done
Now work very fine!!
Very thanks!!
Dani
O 07/03/19 ás 12:59, André Miranda escribiu:
Why don't you just use sed?
E.g. target=$(echo $source | sed "s/\/blog_web\//\/blog_src\//g")
On Thu, Mar 7, 2019 at 1:55 AM Dani <d...@damufo.com
<mailto:d...@damufo.com>> wrote:
Hello:
$ thunar -q && thunar
The error is:
/bin/sh: 1: Bad substitution
The problem seems to be right where you thought, in the substitution.
target="${source/\/blog_web\//$moveTo}";
I even tried removing the bars in the replacement as if they were the
problem and nothing.
for i in %F; do source=$i; zenity --info --text=$source;
moveTo="blog_src"; zenity --info --text=$moveTo;
target="${source/blog_web/$moveTo}"; zenity --info
--text=$target; done
Very thanks
Dani
O 06/03/19 ás 19:29, André Miranda escribiu:
> On 06/03/2019 13:05, Dani wrote:
>> When run thunar from terminal, no show nothing.
>> (Seems to have no verbose mode, as -> $ thunar &)
> No need to append an ampersand, did you first kill the daemon
> instance? Run thunar -q && thunar.
>
>> This not work for me:
>>
>> for i in %F; do source=$i; moveTo="/blog_src/";
>> target="${source/\/blog_web\//$moveTo}"; mv "$source $target"; done
> It has to be mv "$source" "$target"
>
>> I test with (multi select)
>>
>> for i in %F; do source=$i; moveTo="/blog_src/";
>> target="${source/\/blog_web\//$moveTo}"; zenity --info
>> --text=$source; zenity --info --text=$moveTo; zenity --info
>> --text=$target; done
>>
>> No show anything
> With two files named "a" and "b", this command works for me, 6
dialogs
> appear one after the other, their outputs are:
> /home/andre/Downloads/blog_web/a
> /blog_src/
> /home/andre/Downloads/blog_src/a
> /home/andre/Downloads/blog_web/b
> /blog_src/
> /home/andre/Downloads/blog_src/b
>
> _______________________________________________
> Thunar-dev mailing list
> Thunar-dev@xfce.org <mailto:Thunar-dev@xfce.org>
> https://mail.xfce.org/mailman/listinfo/thunar-dev
_______________________________________________
Thunar-dev mailing list
Thunar-dev@xfce.org <mailto:Thunar-dev@xfce.org>
https://mail.xfce.org/mailman/listinfo/thunar-dev
_______________________________________________
Thunar-dev mailing list
Thunar-dev@xfce.org
https://mail.xfce.org/mailman/listinfo/thunar-dev
_______________________________________________
Thunar-dev mailing list
Thunar-dev@xfce.org
https://mail.xfce.org/mailman/listinfo/thunar-dev