Sort by line/sort by sentence -suggestions ?

  • Thread starter Thread starter John Fitzsimons
  • Start date Start date
I was shocked myself. I fully expected it to choke and lock up as the
previous editors I tried did. I mean not even a cough or a sputter.
They failed immediately and required three fingers.
I think the search and replace only accepts one criteria at a time. I
did "newline/>" and it got almost all of them. This skips MID's and
such. BK Replacem might work better with multiple filters going.

I believe that would only delete one greater-than. How does that syntax
delete multiples?

(And John specified that all greater-thans be deleted, not just ones at
left margin. I followed his requirements.)
The file was John's file copied 10 times for the previous post.
I tried doubling it (20 times) 59,433,481 bytes (~60 megs)
 
Blinky the Shark <[email protected]> wrote:

[referring to quote marks:]
You took out groups of them, too? In pretesting with a small file, I
accidentally only removed "stand-alone" (single) greater-thans. Did you
use the starter file John linked, so that our files were close to the
same in terms of content? There were bazillions of g-t's in his file,
because it was a bunch of news posts head to tail, and was thus very
g-t-heavy, between quotes and "<string>" formations.

BK ReplaceEm proved superior for removing the quote marks.

That's not an editor, right?
This file was John's file 40 times over. It is 118,226,241 bytes
Yow!

(after removing the quote marks).. There were 892,320 changes. I used
9 filters, although more might be necessary for other similar files:

Howcum you didn't just use one regex?
 
On Sat, 02 Aug 2003 10:34:47 GMT, (e-mail address removed) wrote:

This file was John's file 40 times over. It is 118,226,241 bytes
(after removing the quote marks).. There were 892,320 changes. I used
9 filters, although more might be necessary for other similar files:
|

< snip >

Ah ! I hadn't got around to working out all those combinations yet.
Well done. I think there are more too but now that you have pointed
out the above I will look more diligently. Thanks. :-)

I think that possibly removing all " | " first would make things
easier. Or would those appear in a web address ? URL etc. ?
I don't think so.

When I looked at things I combined your first, third, sixth and eighth
options into one by substitution of "one or more >".

Regards, John.

--
****************************************************
,-._|\ (A.C.F FAQ) http://clients.net2000.com.au/~johnf/faq.html
/ Oz \ John Fitzsimons - Melbourne, Australia.
\_,--.x/ http://www.aspects.org.au/index.htm
v http://clients.net2000.com.au/~johnf/
 
For those who prefer testimonials about programs, I think this one is
worthy. John was having problems editing/search and replace/sorting
large text files. Many editor authors refer to a 2 meg file as HUGE
when they say their editor can handle huge files.

That's pretty much the conclusion that I have come to.
This particular one
is 30 megs and most everything that I've tried so far has failed
miserably. Bk ReplaceEm can hang, but editors have been a problem.
The only editor I've found so far for Windoze:
EditPad Lite

Thanks. Will take a look at that. I am also in the process of checking
out recommendations by Blinky and Jack. :-)
Consider this an early nomination. Give it a spin and see what you
think. It just became my default editor. There is an option to store
settings in an .ini file and to leave the registry clean. Great
program!
The test file (if you don't have one) is the text at this link, copied
to itself ten times (~30 meg text file, 28+ million characters):

Yes, that needs to be appended that many times for a file that size.

Regards, John.
 
John Fitzsimons wrote:

I concatenated them to create one large file of about 27mb and
about 800,000 lines:

I stuck a sorting script[1] in what, in Windows terms, would probably
be my vim[2] "ini" file.

Okay, but not knowing which file you mean (a vimrc file ?) and/or
where in the file to put it, and/or which directory it should be in,
it doesn't help *me* to do this.
I opened the file in vim, ran the script, and was prompted for which
column to sort on. I accepted the default column 1. This sorted
the file into a new file (to leave the original intact), named big.tmp

Looks like a handy script. I did once get it to give me that dialog
but I cannot remember now how I got it to work that far.

Vim reminds me of Emacs. First I have a "buffer" down the bottom of
the screen, maybe with provision of a "command line".

Then I don't.
Then I do.
Then I don't.
Then I do.
Etc. etc.

There seems to be no way of putting/removing it there. Maybe it is
controlled by the phases of the moon ? I sure couldn't see any menu
item to do that. Appearing/disappearing seems to be totally random.
There one minute and gone the next.

I had hoped that the toolbar icon "Run a Vim Script" might............
wait for it...........run a Vim script.

It didn't. I selected the cream-sort.vim file from my
C:\Vim\vim62\plugin directory and nothing happened. :-(

No idea why. Any suggestions anyone ?


< snip >

Very handy links. Looks to be a very good program. IF one is willing
to wear the IMO very steep learning curve.

Thanks for the testing, feedback and referral. :-)

Regards, John.
 
Back
Top