LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Add newline EOF (.gz files) (https://www.linuxquestions.org/questions/linux-newbie-8/add-newline-eof-gz-files-867664/)

BarataPT 03-10-2011 04:32 AM

Add newline EOF (.gz files)
 
Hi,

I have 165 files with .txt.gz type that store queries made on a browser. The problem is that the last query is always wrongly saved (because of lost connection).

What i want to do is when i'm writing the results to the STDOUT, add a newline at the end of each file, so that i can minimize this problem.

I read the files this way:
Quote:

find . -type f | xargs zcat
Then i use some perl script to do some calculations.

The large amount of data stored makes decompressing the .gz files impracticable.

timetraveler 03-10-2011 08:56 PM

Maybe if you provide more info someone can help.

ntubski 03-11-2011 10:58 AM

How about
Code:

find . -type f -exec zcat {} \; -printf '\n'


All times are GMT -5. The time now is 02:28 PM.