Re: How can I erase these blank lines
From: Chris F.A. Johnson (c.fa.johnson_at_rogers.com)
Date: 03/30/04
- Next message: Han JIANG: "Thanks"
- Previous message: Charles Demas: "Re: How can I erase these blank lines"
- In reply to: Han JIANG: "How can I erase these blank lines"
- Next in thread: Han JIANG: "Thanks"
- Reply: Han JIANG: "Thanks"
- Reply: bravored: "Re: How can I erase these blank lines"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Mar 2004 18:01:09 GMT
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
- Next message: Han JIANG: "Thanks"
- Previous message: Charles Demas: "Re: How can I erase these blank lines"
- In reply to: Han JIANG: "How can I erase these blank lines"
- Next in thread: Han JIANG: "Thanks"
- Reply: Han JIANG: "Thanks"
- Reply: bravored: "Re: How can I erase these blank lines"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|