{"id":860,"date":"2015-09-22T05:24:28","date_gmt":"2015-09-22T05:24:28","guid":{"rendered":"http:\/\/shivdev.com\/blog\/?p=860"},"modified":"2015-09-22T05:24:28","modified_gmt":"2015-09-22T05:24:28","slug":"concatenate-several-gz-files-into-one-using-bash-linux-command-line","status":"publish","type":"post","link":"http:\/\/shivdev.com\/blog\/2015\/09\/22\/concatenate-several-gz-files-into-one-using-bash-linux-command-line\/","title":{"rendered":"Concatenate several gz files into one using bash linux command line"},"content":{"rendered":"<p>This will work if there is only one period followed by gz. (*.gz)<br \/>\nLoop over all the files and extract the filename. Then do the usual &#8230;<\/p>\n<blockquote><p>for f in *.gz; do export l=`echo $f | cut -d&#8217;.&#8217; -f1` ;  gunzip $f; cat $l >> big_file ; gzip $l; done<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>This will work if there is only one period followed by gz. (*.gz) Loop over all the files and extract the filename. Then do the usual &#8230; for f in *.gz; do export l=`echo $f | cut -d&#8217;.&#8217; -f1` ; gunzip $f; cat $l >> big_file ; gzip $l; done<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[],"_links":{"self":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/860"}],"collection":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/comments?post=860"}],"version-history":[{"count":1,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/860\/revisions"}],"predecessor-version":[{"id":861,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/860\/revisions\/861"}],"wp:attachment":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/media?parent=860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/categories?post=860"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/tags?post=860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}