[oclug] ...and speaking of awk...
rjordan at blanch.math.uwaterloo.ca
Fri Feb 23 15:29:42 EST 2001
> > > cat <your html file> | sed "/href=/s/http:\/\/some.url/./g"
> > Not to be picky, but this is gratuitous use of cat.
> > sed "sed_command" < file will avoid spawning the additional cat
> > process. It's almost as bad as when people do " cat file |
> > grep regex", rather than "grep regex file" or "grep regex < file".
> What is the issue with an additional process? The box has more than enough
> CPU and memory to handle one cat process - heck, it barely yawns and
> stretches when I compile the kernel. :)
> I'm not saying you're wrong, in fact, quite the opposite, but, why does this
> matter? It's certainly not noticeably faster to use '< ...' vs 'cat ... |'.
> Is this a historical perspective ("A good admin always conserves processes
> 'cause we've only got 4k of memory.")?
True; I guess its more a matter of principal -- i.e. in wasting resources,
with no different outcome. Perhaps on a multi-user system, it might make a
difference with *many* users.
More information about the OCLUG