Chris,
>>>>>> Chris Bidmead (CB) wrote at Fri, 23 Nov 2001 16:44:51 +0000:
CB> On Friday, November 23, 2001, at 01:33 pm, Ondra Cada wrote:
CB> >
CB> >% alias rewrap sed -f ~/Script/rewrap.sed
CB>
CB> Oh, I see what you mean. I didn't get it at first. No, I don't really
CB> like that. It creates two entities, the script and the shell alias.
Well, this can be sured by using
% alias rewrap sed -e '...the well known stuff...'
I personally prefer having my sed scripts in text files, since they are more
easily maintained. That is, of course, just a personal preference.
CB> sed is ubiquitous, I just wanted one self-contained entity that declared
CB> its origins and function (in the comments) and functioned. Just one thing
CB> to move around among my various systems. You can do this with awk, why
CB> not with sed (haven't seen any sed script examples beginning #!...)
I must say I don't know the details of interpretation #! in scripts that
well. I guess the problem is that sed can't interpret a script if it goes in
without -f; the idea might be _QUITE_ wrong though!!!!
CB> In the current context I run it through TextExtras, which doesn't care if
CB> it's a script or a command line.
CB>
CB> >Strangely, I need this seldom enough to be quite satisfied with the
CB> >quick-and-dirty TextEdit solution (find-and-replace \n\n by blahblah,
CB> >f&r \n
CB> >by space, f&r blahblah by \n\n, manually).
CB>
CB> Does TextEdit recognise \n in Find? I've never been able to do this.
Well, not as "\n", but as either pasted value, or cmd-e-brought one (which I
would use here), or Alt-Enter it always worked (even in Edit in those nice
days so far ago ;)) and does still.
CB> >OTOH, should I need it as often as you, I would probably write a "smart"
CB> >tool, which would support different ways of re-wrapping, it would also
CB> >clean
CB> >out those CR's from windoze or Classic, etc.
CB>
CB> I've found it easier just to clean out Classic and Windows... :-) Just
CB> don't touch 'em, mate.
I'd like to. So far though -- triple alas! -- Classic is the only way how to
get Final Cut Pro and DVD Studio Pro, and windoze are the only way how to
make and build applications for my Nokia 9210 (well, we got quite far with
XSdk to do it in a decent environment, but the late Psion quit got us quite
dry on funds, and that quitted XSdk as well).
CB> And I'm not sure why you would want different ways
CB> of re-wrapping.
At the very least I would _sometimes_ like to have one \n, _sometimes_ two
of them between paragraphs.
CB> (BTW, has anyone noticed the very peculiar ideas that Mail.app
CB> seems to have about breaking lines?)
Nope. I've tried the thing once or twice, and run away. Now I contentedly
use my old good trusty NeXTStep 3.3 Mail ;)
---
Ondra Cada
OCSoftware: [log in to unmask] http://www.ocs.cz
2K Development: [log in to unmask] http://www.2kdevelopment.cz
private [log in to unmask] http://www.ocs.cz/oc
|