parallel
[Top][All Lists]
Advanced

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

Re: Carriage Return after each argument


From: Ole Tange
Subject: Re: Carriage Return after each argument
Date: Tue, 11 Mar 2014 10:40:15 +0100

Ahh... It is the record delimiter, that is causing you troubles.

Hans' solution would work fine, but you can actually set the record
delimiter in GNU Parallel. The default is \n. Compare:

$ printf "A\r\nB\r\n" | parallel 'echo {}|wc -c'
3
3
$ printf "A\r\nB\r\n" | parallel -d'\r\n' 'echo {}|wc -c'
2
2

/Ole

On Mon, Mar 10, 2014 at 8:12 PM, Raingo Lee <raingomm@gmail.com> wrote:
> I got to know what's going on.
>
> My urllist file was coming from Windows, so the line breaks are /r/n
>
> However, when "parallel" read each line in urllist, the /n was striped, but
> /r was kept. In the end, the argument lists for each wget becomes, "wget
> url1\r url2\r url3\r"
>
> I don't know whether it's a bug, but I use dos2unix to preprocess each list.
>
> Thanks for your attention.
>
>
> On Mon, Mar 10, 2014 at 3:07 PM, Ole Tange <ole@tange.dk> wrote:
>>
>> I do not understand what is not working. Can you provide an example
>> showing the problem?
>>
>> /Ole
>>
>> On Mon, Mar 10, 2014 at 4:46 PM, Raingo Lee <raingomm@gmail.com> wrote:
>> > I am using parallel + wget to download a list of urls.
>> >
>> > I would like to append multiple urls at the end of wget for each wget
>> > process.
>> >
>> > parallel will append a 'carriage return' after each argument, so all
>> > urls
>> > are appended with a %0D by wget.
>> >
>> > Is there are anyway to get around this?
>> >
>> > Thanks,



reply via email to

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