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. 2 1845
<di**********@g mail.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
On 21 Aug 2006 13:45:14 -0700, di**********@gm ail.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 text, I
lose the leading blank line. Each time it goes through
a post any top-leading blank line is lost. Only one-
if I have several blank lines in a row at the top,
only the first is lost. (If the top blank line has
a single space, it's handled...
|
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'
the file always starts with three blank lines and
then the data, when opened with spreadsheet, text
editor, or pager.
|
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)
My main problem is: getting each paragraph into my vector array - so
that each paragraph sits in a new array element. Eg: when i referance
array elemant 2 it will give me paragraph which is in that element and
not all paragraphs in the text file...
|
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 while statement checking
for an empty string "" which I understand represents an EOF in Python.
The text file has some blank lines with spaces and other with blanks.
Thanks a lot.
|
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 statement are
use dbname
set nocount on
go
When I run this, an additional blank line is put into the output file.
Actually, there are two lines after the last result set in the output
file. This file is being fed into another system and the...
| |
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 display I see CR/LF codes with blank entries in between as such:
0D0A2020202020202020D0A
|
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 without running out of memory, so I'm reading and as I'm reading I'm going to write to a file.
This is the thing though, I already can do this and have it done, but I want to modify the program so you can choose what data you want to take out. To...
|
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 such a file "in place" but this is just an exercise at this point. I would not mind using file handles except they seem to add complexity.
The only apparent problem I have with my script so far is that it's adding lots of blank lines to the file...
|
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 before the promt <. The sentence 'string to be replaced' need to be replaced by the sentence 'changed'.
The sentences 'string to be replaced is not always the same.
So i would like to delete the line 'string to be replaced and add my new sentence...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |