[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU Parallel Bug Reports --bar and --tagprefix problem
From: |
Andreas Bernauer |
Subject: |
Re: GNU Parallel Bug Reports --bar and --tagprefix problem |
Date: |
Tue, 14 Apr 2015 19:53:16 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 14/04/15 10:42, Tzafrir Poupko wrote:
> I'm using tagprefix to prefix output of every job accoding it's slot
>
> $ ./parallel --tagstring {%} echo {} ::: a b c d e
> 1 a
> 4 d
> 2 b
> 3 c
> 1 e
>
> and it works fine
>
> However when I mix it with --bar command line switch,
> the tag prefix behaves like {#} instead of {%}
> and can be seen that 'e' is prefixed with 5 instead of 1-4
>
> $ ./parallel --tagstring {%} --bar echo {} ::: a b c d e
> 0% 0:5=0s d
> 1 a
> 4 d
> 2 b
> 3 c
> 80% 4:1=0s e
> * 5 e*
> 100% 5:0=0s e
>
> also,
> why is the output distorted and not in a new line?
You direct stdout (output of echo) and stderr (output of --bar) both to
the terminal, which is why things get distorted.
Try redirecting outputs somewhere else:
$ parallel --tagstring {%} --bar echo {} ::: a b c d e 2>tmp
3 c
4 d
2 b
1 a
5 e
$ cat -v tmp
^M^M# 0 sec d
^M0^M^[[7m^[[0m0% 0:5=0s d
...etc.
Don't know if this fixes your --tagstring issue, too.
-Andreas