A Windows 98 & ME forum. Win98banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Win98banter forum » Windows 98 » Software & Applications
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

add extra line to text file



 
 
Thread Tools Display Modes
  #1  
Old September 24th 08, 08:43 PM posted to microsoft.public.win98.apps
[email protected]
External Usenet User
 
Posts: 1
Default add extra line to text file

I'm looking for help editing a text file.

Where the date changes between rows I'd like to insert an extra line.

The first row of the file contains 'Sep 1', so will the second, third
and so on.

Then on maybe the 10th line the date changes to Sep 2 and so will the
next and the next and so on.

I'd like to insert a line break between where the date changes from
Sep 1 to Sep 2. Then I'd like another line break where Sep 2 changes
to Sep 3. I'd like to repeat this throughout the file.

All rows contain Sep.

The date only appears once on each line, but it is not in a fixed
position. I mean it is not always a set number of characters from the
start of the row.

The number of rows on which a date appears is not fixed either. So Sep
1 may appear 10 times, but Sep 2 may only appear 8.

The rows are in date order.

The text of each row is one long string of varying length.

All help greatly appreciated.

Regards,
Ciarán
  #2  
Old September 24th 08, 10:12 PM posted to microsoft.public.win98.apps
Steve Hayes
External Usenet User
 
Posts: 3
Default add extra line to text file

On Wed, 24 Sep 2008 12:43:23 -0700 (PDT), wrote:

I'm looking for help editing a text file.

Where the date changes between rows I'd like to insert an extra line.

The first row of the file contains 'Sep 1', so will the second, third
and so on.

Then on maybe the 10th line the date changes to Sep 2 and so will the
next and the next and so on.

I'd like to insert a line break between where the date changes from
Sep 1 to Sep 2. Then I'd like another line break where Sep 2 changes
to Sep 3. I'd like to repeat this throughout the file.

All rows contain Sep.

The date only appears once on each line, but it is not in a fixed
position. I mean it is not always a set number of characters from the
start of the row.

The number of rows on which a date appears is not fixed either. So Sep
1 may appear 10 times, but Sep 2 may only appear 8.

The rows are in date order.

The text of each row is one long string of varying length.

All help greatly appreciated.


There's a program called AWK that can probably do that. I'm not sure if Word
can.


--
Steve Hayes from Tshwane, South Africa
Web:
http://hayesfam.bravehost.com/stevesig.htm
Blog: http://methodius.blogspot.com
E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
File Line:582 Meaasge? maryallysonsims General 8 July 28th 06 12:43 AM
When I print a file, sometimes the top line of text, on a page oth b11_ General 4 May 21st 06 07:54 PM
Shell .PIF file to DOS nogo due to invalid Autoexec.bat line. Phil General 4 April 25th 06 10:00 PM
Printing to text file from DOS app [email protected] General 7 August 9th 05 01:16 PM
Changes to a file with plain text editor Zakynthos General 4 November 15th 04 01:50 AM


All times are GMT +1. The time now is 11:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Win98banter.
The comments are property of their posters.