Duplicate each record. Specify the number of rows to duplicate at n=, and duplicate records based on the field specified at f= parameter.
mduprec f=|n= [i=] [o=] [-nfn] [-nfno] [-x] [--help] [--version]
f= Duplicate records based on the values in the field name. Duplicate the number of rows for each record based on the numeric values in the column. n= Number of records to duplicate Specify the number of rows to duplicate for each record.
Generate multiple records of the data based on the numeric value in the “Quantity” field. Records containing NULL values will not be duplicated.
$ more dat1.csv store,val A,2 B, C,5 $ mduprec f=val i=dat1.csv o=rsl1.csv #END# kgduprec f=val i=dat1.csv o=rsl1.csv $ more rsl1.csv store,val A,2 A,2 C,5 C,5 C,5 C,5 C,5
Duplicate two rows (n=2) for each record in the dataset.
$ mduprec n=2 i=dat1.csv o=rsl2.csv #END# kgduprec i=dat1.csv n=2 o=rsl2.csv $ more rsl2.csv store,val A,2 A,2 B, B, C,5 C,5
mcount : Reverse the operation of mduprec.
mwindow : Copy and shift a specified number of records.