Quoting Stewart Stremler <[EMAIL PROTECTED]>:
But no, the real implication is that using /bin/bash instead of /bin/sh (or, god forbid, linking /bin/sh to /bin/bash) is harmful and arrogant.
Ah.. you're referring to portability and such. No?
Yeah, though I tend to use bash over sh myself since I use some of the bash-only
tricks.. or at least sometimes have issues with sh vs bash. Though my work is
like 99.8% linux these days.
Poorly written scripts cause all kinds of problems no matter what they are written in.
Yeah, but many of the issues we have are due to the usage of csh instead of sh/bash/ksh.
What's really sad is that I think most of the people chose csh because they wanted to use switch, and didn't know (or understand) case in sh.
We actually want to try to get all their wrappers re-written, with one uber wrapper in perl (since the vast majority of the wrappers do a lot of the same stuff), or basically an uber module that shorter perl, per-tool wrappers would use for the basics.
Well, that's what you get for using colored paths.
Nah.. it's what we get due to everyone doing:
set path=( $path <some paths> . )
all the time.. yes, they just about _all_ use . in their paths.. even after we
warn them. This was why one of the past sysadmins wrote a program called
envmgr ages ago... cool little program that removes duplicates in env variables
and prints out the syntax you need to set a variable.
i.e.
rs-workstation linux {553}$ envmgr -a PATH /bin
PATH=/pkg/qct/sunray/bin:/usr/bin:/usr/ucb:/usr/afsws/bin:/usr/openwin/bin:/usr/dt/bin:/bin:/usr/local/bin:/usr2/mmarion/bin:/usr/local/sbin:/usr/sbin:/sbin:/pkg/icetools/bin:/usr2/mmarion/pkg/bin:/pkg/ice/sysadmin/bin:/opt/gnome/bin:/usr/X11R6/bin:/pkg/qct/software/bin:/pkg/qct/software/perl/bin;
export PATHwith swithces like -a to add, -p to prepend, -r to remove.. etc. you just call
it with:
eval `envmgr <stuff>`
and it helps keep things clean. I got so used to it that I use it at home too.
One of these days I'll see if he ever released it, or if we can.. nothing
QC-oriented in it AFAIK. Of course, one could script up something similar
anyway.
We try to use envmgr in any scripts we write (and for things like package subscriptions.. don't ask) to keep people's env's as clean as we can.
I'd suggest that *all* bash or tcsh scripts be thrown out -- if you can't write it in sh, csh, or ksh, use perl or tcl instead.
Well for linux scripts, considering that bash is usually the defacto standard shell anymore... I don't see using bash there an issue.
-- Mike Marion-Unix SysAdmin/Staff Engineer-http://www.miguelito.org Marge: "Homer, sitting that close to the TV can't be good for you." Homer: "Talking while the TV's on can't be good for you!" ==> Simpsons
-- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
