473,387 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

replacing blank lines in my .txt data file

Hi all,

How could I substitute the blank lines in my .txt data file. It has
many empty lines between groups of "text". In truth, the file is not a
well-formated one, in strict sense. I would like to change blank lines
for "special caracter", for example "$". I supose this is easy to do,
but is taking my time in such a way that I'm thinking about to do
manually.

"Things that only a begginer can't see, you know"

Thanks a lot.

Aug 21 '06 #1
2 1821
<di**********@gmail.comwrote...
How could I substitute the blank lines in my .txt data file.
Is that a question.
It has
many empty lines between groups of "text". In truth, the file is not a
well-formated one, in strict sense. I would like to change blank lines
for "special caracter", for example "$". I supose this is easy to do,
but is taking my time in such a way that I'm thinking about to do
manually.
Do them "manually". Writing a special program for that while there are
things around like awk, or sed, or good text editors, is a waste of time.
"Things that only a begginer can't see, you know"
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Aug 21 '06 #2
On 21 Aug 2006 13:45:14 -0700, di**********@gmail.com wrote:
>Hi all,

How could I substitute the blank lines in my .txt data file. It has
many empty lines between groups of "text". In truth, the file is not a
well-formated one, in strict sense. I would like to change blank lines
for "special caracter", for example "$". I supose this is easy to do,
but is taking my time in such a way that I'm thinking about to do
manually.

"Things that only a begginer can't see, you know"

Thanks a lot.
Well, if it's not a part of some greater scheme :) I would do that
using an external program of some kind. For example Notepad2
(very nice portable replacement for notepad, in 1 exe file) has a
fuction that does just that.

adieu
ldigas
Aug 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: dan glenn | last post by:
Hi. I'm finding that if I have text entered into a <textarea ...> </textarea> in a form, and that text has leading blank lines (with no spaces or anything else), that when I retrieve the entered...
2
by: Tony Lissner | last post by:
Hi I got this info from http://forums.dreamincode.net/showtopic10131.htm and it works ok with saving the file on the server but when I use the '2 - To create the file for the user to download'...
0
by: Row | last post by:
HI, I would first like to say its been about 3 years since looking at java im very rusty! I have to write a post it notes type applet which will function online. (reading from a flat text file)...
6
by: Ruben | last post by:
Hello. I am trying to read a small text file using the readline statement. I can only read the first 2 records from the file. It stops at the blank lines or at lines with only spaces. I have a...
3
by: yanakal | last post by:
Hi, I'm using isql to query data and output the same to a flat file. The isql has the following command options ' -h-1 -w500 -n -b -s"" '. In the SQL_CODE, the first two lines before the select...
0
by: jason | last post by:
Hello. I'm sure this is a common problem. I have output I'm displaying on an html form that has blank lines I'd like to remove. When I clip and paste the output onto an editor with hex...
10
blazedaces
by: blazedaces | last post by:
Alright guys, so the title explains exactly my goal. The truth is I'm going to be reading in a lot of data from an xml file. The file is too large and there's too much data to store in arraylists...
1
by: Matt Herzog | last post by:
Hey All. I'm learning some python with the seemingly simple task of updating a firewall config file with the new IP address when my dhcpd server hands one out. Yeah, I know it's dangerous to edit...
5
by: ramesh54 | last post by:
Hello All, I have two lines as follows in my file. <start>start of program<end> <start>string to be replaced<end> These lines are in the middle. There are blank spaces...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.