bugGNU Parallel - build and execute command lines from standard input in parallel - Bugs: bug #34109, parallel doesn't pass input...

 
 

bug #34109: parallel doesn't pass input filenames or target command options one by one like xargs does

Submitted by:  Reinier Post <r_p>
Submitted on:  Tue 23 Aug 2011 08:21:16 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 25 Aug 2011 12:18:20 AM UTC, comment #2:

I use xargs a lot, and nearly always with the -d '\n' argument, so I definitely agree that parallel's convention for handling input words is more convenient. But I also like the principle of least surprise.

For handling command line words I'm not sure parallel's choice is more convenient.

I would read the xargs incompatibilities section as soon as I start to rely on parallel for anything other than throwaway commands, e.g. in scripts. I would have read it right away if there was a remark about it in the first paragraphs.

So that may be useful to add. E.g. "Note xargs users: parallel uses slightly different conventions for interpreting its arguments; see DIFFERENCES WITH XARGS below."

Reinier Post <r_p>
Wed 24 Aug 2011 09:35:24 AM UTC, comment #1:

One of my major annoyances with xargs was that it treated input as white space delimited and not new line delimited. So this part is by design:

$ echo quux > 'foo bar'
$ ls foo* | xargs cat
cat: foo: No such file or directory
cat: bar: No such file or directory
$ ls foo* | parallel cat
quux

It is also by design that you can use redirection like this:

$ ls foo* | parallel echo '>' {}

Where as xargs will just print the '>'.

$ ls foo* | xargs -n1 echo '>' {}
> {} foo
> {} bar

Unfortunately a consequence of this is that a string with spaces will have to be quoted, which can be done like this:

$ ls foo* | parallel echo '\>' {}
> foo bar
$ ls foo* | parallel echo '">"' {}
> foo bar
$ ls foo* | parallel -q echo '>' {}
> foo bar

If the man page had a section on incompatibilities with xargs would you have read that?

Ole Tange <tange>
Project Administrator
Tue 23 Aug 2011 08:21:16 PM UTC, original submission:

GNU parallel turns out to be incompatible with GNU args when it comes to passing input filenames and command arguments:

This is unexpected to novice users like me who expect parallel to be a drop-in replacement to xargs as much as possible.

Is this behavior unknown, buggy, or there by design?

Reinier Post <r_p>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tange (Posted a comment)
  • -unavailable- added by r_p (Submitted the item)
  • -unavailable- added by r_p
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 24 Aug 2011 09:35:24 AM UTCtangeStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed
    Tue 23 Aug 2011 08:21:16 PM UTCr_pCarbon-Copy-=>Added r_p

    Back to the top


    Powered by Savane 3.1-cleanup1