On 18/10/2004, at 9:52 AM, Paul Koning wrote:
It's FN<search>$<replacement>$ So lf to crlf is the reverse of what I
wrote.
> Linux (unix) {ohh noo don't look Fred} uses only linefeeds...
>
> EX$$ ? I thought that's what I typed to exit teco... oh wait I get it
>
> FN^j$<cr>$ <--- change all vs FS change next
> EX$ <---- exit after changes
> $ <--- ok doit already.
Well, the real difference with FS and FN is related to the way teco
loads files into memory in "pages". Take for example the following
(assuming myfile.txt has many lines in it):
.teco
*ewmyfile.txt$$ - open myfile.txt for updating (Edit Write)
*ht$$ - print it all out
* - OK, where did it go????
The answer is that the editing buffer hasn't been loaded with any of
myfile.txt
*10000<a>$$ - OK, so my DECsystem-10 has lots of memory. Use the A
command to
- to load "pages" of myfile.txt into the buffer. As I'm lazy,
- do 10000 A's in a loop - no file I ever edited was bigger than
this!
- Now HT will do it's thing properly
Now getting back to FS and FN. FS does a "find and replace" in the
current buffer. FN does this,
writes the current buffer out, and "yanks" in the next page. The teco
command to do the yank is Y.
So for small files, FS and FN do the same, but for large files the
results may well differ - something
I learnt a long time ago....
Huw Davies | e-mail: Huw.Davies(a)kerberos.davies.net.au
Melbourne | "If soccer was meant to be played in the
Australia | air, the sky would be painted green"