aboutsummaryrefslogblamecommitdiff
path: root/man/man1/try.1df
blob: fd3240094881cf5bab3d9aa31b7a17ec6c86c4ce (plain) (tree)
1
2
3
4
5
6
7
8
9
                                               



                                                                      

                                        
               
                                                                             

                                                                            

                                                                         
                                                                              
    
  
              
                     
            
                    

                               
.TH TRY 1df "August 2016" "Manual page for try"
.SH NAME
.B try
\- attempt a command up to a certain number of times until it succeeds
.SH USAGE
.B try
[-n ATTEMPTS] [-s SLEEP] [--] COMMAND...
.SH DESCRIPTION
Runs the given command up to a fixed number of times until it exits zero.  If
all attempts fail, writes buffered error output from all attempts to stderr.
.P
Option -n specifies the number of attempts, defaulting to 3; option -s
specifies in seconds how long to sleep between attempts, defaulting to 0.
Options may be terminated with --.  The remaining arguments are the command to
run.
.P
   $ try maybe
   $ try -n5 -s10 gms
.SH SEE ALSO
maybe(1df), chn(1df)
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>