bash - How would I merge these 2 commands together? -


input:

    filepath    filename    probability classifierid    hectorfiletype  libmagicfiletype /mnt/hector/data/benign/binary/benign-pete/ 01d0cd964020a1f498c601f9801742c1    19  s040pdfv02  data.pdf    pdf document /mnt/hector/data/benign/binary/benign-pete/ 0299a1771587043b232f760cbedbb5b7    0   s040pdfv02  data.pdf    pdf document 

trying merge 2 commands together, split file , inside split files show file path , classifier id ($1,$2)

awk '{ print >> $5.txt }' < output.txt  awk -v ofs="," 'nr>1 {print $1,$2}' 

-thank

this 1 perhaps:

awk 'nr>1 {print $1 "," $2 >> $5 ".txt"}' < output.txt 

passing input awk < optional. pass file argument instead.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -