up vote 1 down vote favorite
share [g+] share [fb]

i have a .gz file of an sql dump. at the moment i extract it to its own file (ie dump.sql.gz extracted to dump.sql) then i import that file, then once its done i delete the file.

how can i just import without having to make / delete the sql file?

(im on unix btw)

link|improve this question
feedback

1 Answer

If the import tool can read from a pipe you could use zcat

$> zcat dump.sql.gz | import_tool

link|improve this answer
+1 for k.i.s.s. principle :). note zcat's usually a shellscript that exec's gzip -cd (meaning gzip --stdout --decompress) – quack quixote Oct 28 '09 at 0:49
feedback

Your Answer

 
or
required, but never shown