gam@amdahl.uts.amdahl.com (Gordon Moffett) (09/13/88)
When I go to look at localize.sh from time to time, I have to get out the old Usenet references to figure out what it all means. It needs comments! localize.sh uses ed(1) for editing, but that doesn't allow for commenting in the edit script. Fortunately we have ex(1) on our system, and ex(1) does everything that ed(1) does, plus it allows for comments. A comment in ex(1) is a double quote --> " at the begining of a line or after a command (whitespace after a command is ignored). For example, here's an excerpt from our localize.sh: ex - Makefile <<'EOF' " edit script begins here g/^BATCHDIR/s;/usr/spool/batch;/usr/spool/bnews; " where batchfiles go g/^NEWSUSR/s/news/netnews/ " Usenet admin id g/^LIBDIR/s;/usr/lib/news;/usr/local/lib/news; " news library g/^BINDIR/s;/usr/bin;/usr/local/bin; " where readnews, et al, go g/^MINDISKFREE/s/= 0$/= 4096/ " for sendbatch g/^LIBS/s/$/ -ldbm -la # dbm(3x) in -ldbm, ftime(2) in -la/ g/^MISC/s/ftime.o// " see above ... and so on. ex(1) lets you do more fun stuff than ed(1), too, but I just wanted the comments. :-) -- Gordon A. Moffett gam@uts.amdahl.com +1 408 746-8287 {ames,sun,uunet,decwrl}!amdahl!gam