Forum Moderators: not2easy

Message Too Old, No Replies

Text insertion before a number on 10,000 lines possible?

         

chris anda photograp

9:03 pm on Jan 5, 2006 (gmt 0)

10+ Year Member



Text insertion before a number on 10,000 text lines possible?

I figure it could be possible to do it with a macro or action script of sorts however one would need to start from the last line forward as the text inserted will need to be 3 lines or more itself and that would make the line seeking not work properly if started from the beginning.. Below is example of what I am trying to achieve..

111111
222222
333333
444444
555555

turned into this 10,000 times automated in a batch file?

Please post a reply as what application I should be using if any you know of out there?

below is what the end 10,000 lines turned into 40,000 should look like...

SAME TEXT SAME TEXT 111111
SAME TEXT SAME TEXT
SAME TEXT SAME TEXT
SAME TEXT SAME TEXT 222222
SAME TEXT SAME TEXT
SAME TEXT SAME TEXT
SAME TEXT SAME TEXT 333333
SAME TEXT SAME TEXT
SAME TEXT SAME TEXT
SAME TEXT SAME TEXT 444444
SAME TEXT SAME TEXT
SAME TEXT SAME TEXT
SAME TEXT SAME TEXT 555555

If you think I will have do this by hand please also post a reply.. Thanks for reading this.. 2 word comments are fine.. Cheers

BigDave

9:23 pm on Jan 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It wasn't very clear what you want to do, but if I understand you right, almost any command based editor could do it, such as vi, emacs, sed or awk.

But those all require reading the documentation to learn the commands, which tends to scare most windoze users away.

chris anda photograp

9:36 pm on Jan 5, 2006 (gmt 0)

10+ Year Member



Thanks Big Dave! I just needed to know some names.. I am scared but what is life without FEAR! Anyhow, if there is a Windoze app I can use I would love it.. I am trying to replicate fuctions in the program "Internet Macros" - for now tommorrow who knows! Awesome.

I am looking for a sort of thing that would identify a line number starting at 10,000 or higher and work it's way backward adding 3 lines of text to each line as it zeros downward to line zero. I think it would not work if it started at the top line going downward.

BigDave

9:42 pm on Jan 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



All those programs I mentioned are available, for free, on windoze. You could also do it in just about any programming language, a large number of which are available for free on windows.

You just aren't very likely to find any sort of pointy-clicky program that will give you the sort of control that you want.

chris anda photograp

10:00 pm on Jan 5, 2006 (gmt 0)

10+ Year Member



Pointy clicky sucks anyway I want to learn the code.. What would be the goo goo ga ga code for my newbie self? I will look into all of them.. Actually screw the newbie.. I want the best most powerful.. (that has a forum for morons and a pdf file to boot my brain on!)

Thanks again Big Dave!

chris anda photograp

10:13 pm on Jan 5, 2006 (gmt 0)

10+ Year Member



Is there a good Linux replacement for VB6 or more important to me at this time is "Internet Macros" thinky that automates tasks and resets itself on errors. I have asked these on other posts and recieved no replies. I run Mepis (music friendly) live CD install on a P4 laptop 2.4.. I think it is Debian based.. I forget as this machine is not and ebay is controlling me right now.. yuk!

chris anda photograp

10:15 pm on Jan 5, 2006 (gmt 0)

10+ Year Member



OK I will swallow Emacs first! See you in 3 months! Thanks Dave! I have a feeling I am hooked.