You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
replaceCmd.Flags().StringP("fields", "f", "1", `select only these fields. e.g -f 1,2 or -f columnA,columnB`)
293
-
replaceCmd.Flags().StringP("gnr-field", "g", "", `select a field for a group-specific record number {gnr}`)
358
+
replaceCmd.Flags().StringSliceP("group", "g", []string{}, `select field(s) for group-specific record numbering, including {gnr}, {enr}, {rnr}. Please use the same field type (field number or column name) with the value of -f/--fields`)
" e.g. $1 represents the text of the first submatch. "+
@@ -305,11 +370,21 @@ func init() {
305
370
replaceCmd.Flags().BoolP("keep-key", "K", false, "keep the key as value when no value found for the key")
306
371
replaceCmd.Flags().IntP("key-capt-idx", "", 1, "capture variable index of key (1-based)")
307
372
replaceCmd.Flags().StringP("key-miss-repl", "", "", "replacement for key with no corresponding value")
308
-
replaceCmd.Flags().IntP("nr-width", "", 1, `minimum width for {nr} in flag -r/--replacement. e.g., formating "1" to "001" by --nr-width 3`)
373
+
replaceCmd.Flags().IntP("nr-width", "", 1, `minimum width for {nr}, {gnr}, {enr}, {rnr} in flag -r/--replacement. e.g., formating "1" to "001" by --nr-width 3`)
309
374
replaceCmd.Flags().IntP("start-num", "n", 1, `starting number when using {nr} in replacement`)
375
+
replaceCmd.Flags().IntP("start-gnr", "", 1, `starting number when using {gnr} in replacement`)
376
+
replaceCmd.Flags().IntP("start-enr", "", 1, `starting number when using {enr} in replacement`)
377
+
replaceCmd.Flags().IntP("start-rnr", "", 1, `starting number when using {rnr} in replacement`)
378
+
replaceCmd.Flags().IntP("incr-gnr", "", 1, `increment number when using {gnr} in replacement`)
379
+
replaceCmd.Flags().IntP("incr-enr", "", 1, `increment number when using {enr} in replacement`)
380
+
replaceCmd.Flags().IntP("incr-rnr", "", 1, `increment number when using {rnr} in replacement`)
381
+
310
382
replaceCmd.Flags().BoolP("kv-file-all-left-columns-as-value", "A", false, "treat all columns except 1th one as value for kv-file with more than 2 columns")
0 commit comments