WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

add extra line to text file

 
   Home -> Windows Other -> Applications RSS
Next:  NT4 Tape (scsi) emulation  
Author Message
ciaran.hudson

External


Since: Sep 24, 2008
Posts: 1



(Msg. 1) Posted: Wed Sep 24, 2008 12:43 pm
Post subject: add extra line to text file
Archived from groups: microsoft>public>win98>apps (more info?)

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
Back to top
Login to vote
Steve Hayes

External


Since: Jun 09, 2005
Posts: 8



(Msg. 2) Posted: Wed Sep 24, 2008 11:12 pm
Post subject: Re: add extra line to text file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 24 Sep 2008 12:43:23 -0700 (PDT), ciaran.hudson.DeleteThis@gmail.com 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
Back to top
Login to vote
Franc Zabkar

External


Since: Sep 03, 2005
Posts: 1487



(Msg. 3) Posted: Mon Sep 29, 2008 3:09 am
Post subject: Re: add extra line to text file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 24 Sep 2008 12:43:23 -0700 (PDT), ciaran.hudson.RemoveThis@gmail.com put
finger to keyboard and composed:

>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

This type of question may be better answered in alt.msdos.batch. Apart
from AWK, there is also SED.

- Franc Zabkar
--
Please remove one 'i' from my address when replying by email.
Back to top
Login to vote
Display posts from previous:   
       Home -> Windows Other -> Applications All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
  Windows Other
 Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET