parsing - Breaking a big file down into smaller files on special char in bash script -


i have huge file 800,000 words in separated | character. write bash script reads file, on every 1000 | dump content file , continues until have

your post appears cut off, gather script should started.

awk 'begin{     fs="|"     y=1     outputfile="/tmp/outfile" }{     (i=1; i<=nf; i++) {         tmpoutput=tmpoutput" "$i         if (y == 1000) {             y=1             print tmpoutput > outputfile             tmpoutput=""         } else {             y++         }     } }end{     print tmpoutput > outputfile }' inputfile 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -