On Tue, 31 May 2011 17:05:55 -0400, "Eric Furman" <ericfur...@fastmail.net> wrote: > On Tue, 31 May 2011 13:43 +0200, "Marian Hettwer" <m...@kernel32.de> >> Obviously not. >> I'm talking about shell scripts which should work in a multi unix >> environment. Namely, in my env, Debian, Solaris and OpenBSD. >> I tend to install gnu sed and gnu grep and gnu diff on all 3 named >> systems. >> I actually see nothing bad about it. Not at all. > > And what do you do when you are not in charge of the box you > need your script to run on? It is not uncommon to work in an > environment with many thousands of boxes most of which you > have no control over. You cannot depend on gnu or any other > tools being installed on them. Better to have your script > detect which OS it's running on and take appropriate action. > You are establishing a very bad habit...
I can only partly agree. In my case, I am in charge of them boxes. And we are talking a thousand and a bit. However, if I'm not in charge of the box, I do make sure that my script will run with the native tools of whatever unix (well, Linux, FreeBSD, OpenBSD, Solaris) it should run on. I do disagree with regards to a bad habit. It isn't. It's pragmatic. That's what you do if you are in charge of the boxes. And yep, this is really OT now. Cheers, Marian