One of my favourite functions of ed is to arrange the lines of a file by regex:

g/foobar/m0

(The usefulness of this becomes clear when you're working on horrendus 
spreadsheets, for example.)

In Sam, I tried variations of:

x g/foobar/m0

but consistently received "changes not in sequence" errors.

I don't understand.  As I read Mr. Pike's paper, Sam works much as ed in these 
loops; one pass over the file to mark the changes to be made, another to make 
the changes. 

Thanks in advance!

Reply via email to