bugGNU Parallel - build and execute command lines from standard input in parallel - Bugs: bug #35949, Option to be quiet on error

 
 

bug #35949: Option to be quiet on error

Submitted by:  Jay Hacker <jayqhacker>
Submitted on:  Thu 22 Mar 2012 03:56:08 PM UTC  
 
Category: NoneSeverity: 1 - Wish
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: Ole Tange <tange>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 06 May 2012 11:20:05 AM UTC, comment #1:

That seems like a very specific use case. If others report this as a general problem I will consider implementing it.

Right now you can do some redirection gymnastics to get what you want:

parallel --halt 1 '(command) 2>&3' 3>&2 2>/dev/null

E.g.
parallel --halt 1 '(ls /no_such_file;exit {}) 2>&3' ::: 0 1 2 0 3 3>&2 2>/dev/null

It has a small risk of race condition if more jobs output to stderr at the same time. If you do not use STDOUT you can avoid that:

parallel --halt 1 '(ls /no_such_file;exit {}) 2>&1' ::: 0 1 2 0 3 1>&2 2>/dev/null

Ole Tange <tange>
Project AdministratorIn charge of this item.
Thu 22 Mar 2012 03:56:08 PM UTC, original submission:

I sometimes use parallel with --halt inside scripts where jobs fail, and then parallel prints out error messages:

$ parallel --halt 1 false ::: 1 2
parallel: Starting no more jobs. Waiting for 2 jobs to finish. This job failed:
false 1
parallel: Starting no more jobs. Waiting for 1 jobs to finish. This job failed:
false 2

I'd like to see the stderr from the jobs themselves, because that is meaningful to the user, whereas the output from parallel is confusing. So I can't just redirect 2>/dev/null.

Could we add a --silent-errors switch or something so that parallel would not print anything on error?

Jay Hacker <jayqhacker>

 

(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 jayqhacker (Submitted the item)
  •  

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 06 May 2012 11:20:05 AM UTCtangeSeverity3 - Normal=>1 - Wish
      StatusNone=>Wont Fix
      Assigned toNone=>tange
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1