mysql - Mysqlimport from pipe -


i'm trying figure out how pipe output mysqlimport without luck. have huge file (~250 gb) want pipe mysqlimport after processing it. don't want create intermediate file/table. i'm imagining this:

cat genome.mpileup | nawk 'sub("^...","")' | mysqlimport -uuser -ppassword database

but isn't working. suggestions on how accomplish this?

it doesn't mysqlimport can read stdin can perhaps experiment named pipe. (untested)

mkfifo bigfile mysqlimport -uuser -ppassword database bigfile & cat genome | nawk > bigfile 

or can use an extension bash run commands instead of files

mysqlimport -uuser -ppassword database <(cat genome | nawk) 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -