Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-10-2011, 04:32 AM   #1
LQ Newbie
Registered: Mar 2011
Posts: 12

Rep: Reputation: 1
Add newline EOF (.gz files)


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:
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.
Old 03-10-2011, 08:56 PM   #2
Registered: Apr 2010
Posts: 243
Blog Entries: 2

Rep: Reputation: 31
Maybe if you provide more info someone can help.
Old 03-11-2011, 10:58 AM   #3
Senior Member
Registered: Nov 2005
Distribution: Arch
Posts: 3,091

Rep: Reputation: 1273Reputation: 1273Reputation: 1273Reputation: 1273Reputation: 1273Reputation: 1273Reputation: 1273Reputation: 1273Reputation: 1273
How about
find . -type f -exec zcat {} \; -printf '\n'


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get dpkg error: files list file ... missing final newline PBSchmidt Debian 12 02-07-2017 10:41 PM
cat 2 files without newline lea Programming 5 12-23-2010 03:54 PM
question about text/source files: what is the EOF indicator? rahul8705 Linux - General 2 11-10-2010 11:36 AM
Concatenating two files without creating a newline between them? linux_newestbie Linux - General 8 03-12-2010 08:16 AM
VI replacement: newline for newline not working! jhwilliams Linux - Software 3 08-16-2007 06:11 PM

All times are GMT -5. The time now is 02:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration