Re: [gedit-list] having problems with gedit adding blank lines to files...



John,

I suspect that Excel, not gedit, is adding the blank lines.  Here's how you can tell for sure.  This command

$ grep -c "^\s*$" FILENAME

will print the number of blank lines in a file.

So you can do this:

1. Use the command above to count blank lines in the file.
2. Run gedit on the file.
3. Run the command above to count blank lines again.

If you do this, does the number of blank lines change from steps 1 to 3?

adam

On Wed, Apr 3, 2013 at 3:51 PM, John Whitney <jwhitney petroak com> wrote:

Hello,

 

I’ve been using gedit to look at and modify large txxt files (~ 1,000,000 lines). However I’ve discovered a problem with gedit adding blank lines to files when opened. For example opened a file, saved, opened it in Excel, search for blank lines and found many, removed blank lines using macro in Excel and saved the file. Opened file again in gedit and blank lines reappear, where when saved back out from gedit, the blank lines appear in Excel again.

 

Has this problem been reported? Is there a solution? Or is there something going on in Excel? (I’ve noticed that I’m seeing data appear in the file in places where data should not be – in a known blank section.)

 

Thanks for any help.

 

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]