Re: How can I erase these blank lines

From: bravored (bravored.13zadm_at_mail.webservertalk.com)
Date: 03/31/04


Date: Wed, 31 Mar 2004 04:17:34 -0600


Hi NewBe Here too

Couldnt you just do dd?

Thanks

Chris F.A. Johnson wrote:
> *On Tue, 30 Mar 2004 at 17:16 GMT, Han JIANG wrote:
> > Hi,
> > I am a newbie on unix. I met a strange problem here on Origin
> 2000.
> >
> > I created a text data file which had 1,000 lines on my pc (Windows
> of
> > course) and upload it to my acoount on Origin.When I use vi to
> edit it on
> > Origin, I found there is a additional blank line between every 2
> lines!
> > That makes my program cann't input this datafile.
> >
> > Who know what happen here? And how can erase these additional blank
> lines?
> > Please don't say erase them line by line since I have 1000 lines
> there.
>
> grep -v '^$' FILE >NEWFILE
>
> Or:
>
> grep '.' FILE >NEWFILE
>
> Or:
>
> awk '/./' FILE >NEWFILE
>
> etc......
>
> --
> Chris F.A. Johnson http://cfaj.freeshell.org/shell
> ===================================================================
> My code (if any) in this post is copyright 2004, Chris F.A. Johnson
> and may be copied under the terms of the GNU General Public License *

--
bravored
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message166859.html
 


Relevant Pages

  • Re: pass environment PATH to #!
    ... Chris F.A. Johnson wrote: ... Are there really still any versions of Unix where /usr/bin and /bin aren't ... Please DON'T copy followups to me -- I'll assume it wasn't posted to the group. ...
    (comp.unix.shell)
  • Re: Reversing Command line arguments
    ... >> I am a newbie at shell scripting and I am trying to write a script ... My code in this post is copyright 2004, Chris F.A. Johnson ...
    (comp.unix.shell)
  • Re: printing line range using sed
    ... Chris F.A. Johnson wrote: ... is that a unix point, ... as it will exit after the last line you want. ...
    (comp.unix.shell)
  • Football for Baseball
    ... 193 Chris Simms ... 199 Rudi Johnson ... 225 Mike Peterson ... Marvin Harrison ...
    (rec.collecting.sport.football)
  • football for baseball
    ... Thing is we only collect cards of a few baseball players ... 193 Chris Simms ... 199 Rudi Johnson ... Marvin Harrison ...
    (rec.collecting.sport.baseball)