parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parallel is having trouble handling quotes for unicode characters


From: Ole Tange
Subject: Re: Parallel is having trouble handling quotes for unicode characters
Date: Thu, 25 May 2017 12:47:14 +0200

On Thu, May 25, 2017 at 6:46 AM, Glen Huang <address@hidden> wrote:

> Parallel is having trouble handling quotes for me. If I run
>
> parallel echo \"'{}'\" ::: 你好 世界
>
> I get \?\?\?\?\?\? back.

Are you sure you do not get:

\�\�\�\�\�\�
\�\�\�\�\�\�

> My mental model for this cmd is that echo "你好" and echo "世界" would be pass to 
> the subshell, and it should print those characters without problem.

And it would do that, if you had not quoted {}. {} is quoted by GNU
Parallel itself so it should not be quoted any further:

$ parallel echo {} ::: 你好 世界
你好
世界

> export start="你好"
> parallel -a file name=\"'${start} {}'\"';' curl -o /dev/null 
> \"'$url/$start/$name'\"

Move {} outside the quotes and it should work.


/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]