Subject: Re: Non-interactive TECO? (of course) Date: 13 May 2002 06:33:35 GMT From: ccburgess@uqstu.jdstory.uq.edu.au (Ian Burgess) Organization: The University Of Queensland Newsgroups: comp.os.vms In article <110520021550154228%elliott@yrl.co.uk>, Elliott Roper writes: >Yesterday I offered a teco macro for fixing crlfs on a wild card >filspec from a .com. It had a bugette on exit. >As promised, the improved macro is (fix_crlf.tec) >hxahken^eqa$<:en$;:eb^eq*$;ec$>ex$$ > >called as before from a command file (fix_crlf.com) which contains >$mung = "$teco32 mung" >$mung fix_crlf.tec,'p1' > >by >@fix_crlf.com *.mem (or whatever it was that RNO used to screw up.) > >I forgot that en$ delivers a null filespec before failing on the next >pass. Adding a conditional to the eb and another break" ;" when it >fails does the trick. > >I've been biting my tongue during the EVE v EDT debate about global >replace routines. So far... > >By simply inserting just before the ec in the above >macro you get the whole wild carded global replace from a command file >that consumed so many bytes of internet over the last few days. > >...damn! I couldn't resist! > >Teco takes a while to learn. After that, you don't type nearly as many >characters of commands to get the job done. Using the same >"mung teco_macro_file,text" trick, it should be fairly easy to pass in >str1 and str2 from the command line. Not that you would bother. After >becoming a teco user, you would rather write teco than DCL. ;-) Make that If you want to avoid having to type into your procedures, add $ define/user TEC$INIT "96ee" ! set escape character to be ` (96 decimal) before the mung command. Of course your login.com would have defined TEC$INIT to be something like $ define/nolog tec$init "96ee-1es2eh16ed256u0et&512""nq0#128#16u0-1ev'q0#4096" for screen editing! Don't you just love this "clear as mud" stuff! Ian Burgess University of Queensland I.Burgess[at]its.uq.edu.au www.its.uq.edu.au