Another sed question.
Randal Schwartz
merlyn at iwarp.intel.com
Mon Dec 4 08:28:28 AEST 1989
In article <1989Dec2.134348.22524 at virtech.uucp>, cpcahil at virtech (Conor P. Cahill) writes:
| Because the programmer wanted to do it that way. Lots of echos would have
| been ugly, but a cat with here documents would have been just as clear and
| probably as efficient.
Just a nit... The "'cat' on a 'here' document method" must run over
the data twice... once to create the file in /tmp that serves as the
stdin, and once when cat reads that *as* stdin. That's a lot of
overhead if the file is large. Also, you must ensure that you don't
blow away the endmarker when you are editing the file, or the shell
gets a bit confused.
I like the "#!/bin/sed 1d" hack, but only when I'm trying to impress
someone with another tricky use of #!, *or* I have to have a "program"
put out constant text ("blurfl is no longer available... use the
/etc/foobar/blurfl version instead!").
Just another UNIX hacker,
--
/== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\
| on contract to Intel's iWarp project, Hillsboro, Oregon, USA, Sol III |
| merlyn at iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn |
\== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/
More information about the Comp.unix.questions
mailing list