Contents of input data are copied directly to multiple files and standard output.
mtee [o=] [-nostdout] [i=] [-nfn] [-nfno] [-x] [--help] [--version]
o= Output file names. The contents in the input file is duplicated into multiple files. When this parameter is not defined, mtee copies input to standard output. -nostdout Copy to output file but not to standard output.
Copy dat1.csv file to two files rsl1.csv and rsl2.csv In addition, display output on screen through standard output.
$ more dat1.csv customer,quantity,price A,1,10 A,2,20 B,1,15 $ mtee i=dat1.csv o=rsl1.csv,rsl2.csv customer,quantity,price A,1,10 A,2,20 B,1,15 #END# kgtee i=dat1.csv o=rsl1.csv,rsl2.csv $ more rsl1.csv customer,quantity,price A,1,10 A,2,20 B,1,15 $ more rsl2.csv customer,quantity,price A,1,10 A,2,20 B,1,15
When -nostdout is specified, the command only copy the two files rsl1.csv and rsl2.csv but not to standard output.
$ mtee i=dat1.csv o=rsl1.csv,rsl2,csv -nostdout #END# kgtee -nostdout i=dat1.csv o=rsl1.csv,rsl2,csv