[Gllug] Awk Sed

Alex Hudson home at alexhudson.com
Sat Dec 8 16:27:38 UTC 2001


On Sat, 2001-12-08 at 13:29, Colin Coles wrote:
>  Thanks for your comments; I'll never use that naughty piece of coding again, 
> isn't disgusting that people can get away with allowing people to use their 
> poorly written work.

If you took the comment the way it was meant, I wasn't berating you, I
was _warning_ you. 

That script will eat files. If you use the 'from file' function, you'd
better make sure that it's character-perfect. A mis-placed ' ' on the
end of a line and the script will start in / and keep going until it's
searched-and-replaced _every_ file on your system - depending on what
you're searching/replacing, and what user you are, you may well have
just hosed your system. Running that over /dev would be especially
interesting.

Just because you've used it for a while and not suffered any problems
with it doesn't mean that it is unproblematic - it has tons of problems.
The fact that it doesn't back up files before altering them and does
virtually no error checking / sanity checking only makes it worse -
people may well destroy data using this, it's only fair to warn them. If
you think that makes me bigoted, well, I don't care. The script is crap,
but obviously I'm trolling, so I'll stop.

Cheers,

Alex.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20011208/dfcf3a74/attachment.pgp>


More information about the GLLUG mailing list