Home Download Buy Blog Forum Support

Removing empty lines - that gets inserted automatically

Removing empty lines - that gets inserted automatically

Postby Werner on Fri Mar 23, 2012 1:57 pm

ST 2 sometimes expand a (html) file with empty lines between every code line. Could not figure out under which circomstances it would do that.

Is there a command or a way to remove empty lines from a file?

Thanks
Werner
 
Posts: 3
Joined: Fri Mar 23, 2012 1:50 pm

Re: Removing empty lines - that gets inserted automatically

Postby barryw on Fri Mar 23, 2012 2:46 pm

Might not be ST2's fault, could be borked line-endings.

Did you get this file from a machine running on a different operating system? Like perhaps your webserver via FTP?

We had a developer at my last place who was using some weirdo-FTP client and it kept trying to 'fix' line endings when going from a Windows box up to the linux server. Resulted in the same as what you have.

I'm sure there's a plugin that will remove blank lines (Notepad++ has one) but it won't fix the cause of the problem if I'm right.

Good luck
barryw
 
Posts: 10
Joined: Fri Mar 23, 2012 1:12 pm

Re: Removing empty lines - that gets inserted automatically

Postby Werner on Mon Mar 26, 2012 5:44 am

Thanks for the push in the right direction.

Yes, the files are coming over ftp (TotalCommander). I'll investigate further on that.

Appreciate the help.
Werner
 
Posts: 3
Joined: Fri Mar 23, 2012 1:50 pm

Re: Removing empty lines - that gets inserted automatically

Postby Werner on Tue Mar 27, 2012 4:38 am

Just to complete this:

The additional lines are added when the FTP client's transfer mode is set to 'Text' instead to 'Binary".
Werner
 
Posts: 3
Joined: Fri Mar 23, 2012 1:50 pm


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 16 guests