shell script editing and portiblity

shell script editing and portiblity

Post by Eli the beard » Thu, 20 Jul 1995 04:00:00



I have written some shell scripts to generate HTML documents
from plain text on the fly. I decided trying this in sed
would be insane, so I used here-documents and ed. I assume
Gnu ed is clse enough to the Real Thing(tm) that there won't
be any problems with this.

On a couple of rare occasions, I needed to use here-
documents with ex. What are the prospects here? The only ex
feature I need is history in RE substitutions. Do most
free-ware Unices come with a decent ex? Would the Gnu ed be
able to handle this in an ex-compliant manner? (I almost
hope not; it wouldn't be ed-like.)

Elijah
------
1,$ s,\(.*\)\(.html\)$,<li><a href=subdir/\1\2>Archive name: \1</a>,