On Tue, 31 May 2011 13:43 +0200, "Marian Hettwer" <[email protected]>
wrote:
> On Tue, 31 May 2011 11:39:41 +0200, Jeremie Courreges-Anglas
> <[email protected]> wrote:
> > Le 31/05/2011 11:23, Marian Hettwer a C)crit :
> >>> That is a GNU extension. You can work this around with find(1) and the
> >>> tar(1)'s '-I' option.
> > 
> > Also
> > tar cf /foo.tar /bar/!(folder|other_folder)
> > using plain ksh
> >
> that looks nice.
>  
> >> bsdtar from the FreeBSD project supports --exclude too.
> >> The OP could as well install gnu tar from packages. bsdtar doens't seem
> >> to exist...
> >>
> >> At least that's what I do at work (Debian, Solaris, OpenBSD env).
> >> It's a pain to walk around every nifty details of different unixes...
> > 
> > I'm wondering where does that logic stop... do you also install GNU ls
> > to get colors?
> 
> 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...

Reply via email to