2020 fDayOfWeekStartsAtOne bool
2121 fUse24HourTimeFormat bool
2222 fVerbose bool
23+ fPrintAll bool
2324 fVersion bool
2425 fHelp bool
2526
@@ -32,6 +33,7 @@ func init() {
3233 flag .BoolVar (& fDayOfWeekStartsAtOne , "dow-starts-at-one" , false , "Is day of the week starts at 1 (Monday-Sunday: 1-7)" )
3334 flag .BoolVar (& fUse24HourTimeFormat , "24-hour" , false , "Output description in 24 hour time format" )
3435 flag .BoolVar (& fVerbose , "verbose" , false , "Output description in verbose format" )
36+ flag .BoolVar (& fPrintAll , "print-all" , false , "Print all lines which is not a valid cron" )
3537 flag .BoolVar (& fVersion , "v" , false , "Print app version then exit" )
3638 flag .BoolVar (& fHelp , "h" , false , "Print help then exit" )
3739}
@@ -171,11 +173,17 @@ func stream(exprDesc *cron.ExpressionDescriptor, locType cron.LocaleType, reader
171173
172174func normalize (line string ) (expr string , remainder string ) {
173175 if strings .HasPrefix (line , "#" ) {
176+ if fPrintAll {
177+ fmt .Printf ("%s\n " , line )
178+ }
174179 return "" , line
175180 }
176181
177182 parts := strings .Fields (line )
178183 if len (parts ) < 5 {
184+ if fPrintAll {
185+ fmt .Printf ("%s\n " , line )
186+ }
179187 return "" , line
180188 }
181189
0 commit comments