4 ms·
The problem comes in when you need to manage 100's of machines, and there isn't a single shell that is in everyone on the team's muscle memory.
by hedora 5y ago
The problem comes in when you need to manage 100's of machines, and there isn't a single shell that is in everyone on the team's muscle memory.
- mixmastamyk 5y agoYou don’t use a shell for that, directly. Ansible, puppet, docker, etc.
- theamk 5y agoThat's what sh or bash is for, a least common denominator present on every machine. Sure, it is not the same as your home machine - but even with the right shell, you customized config files woukd still be missing. So it is easier to get used to defaukt setup on defaut shell when managing many machines. (This is the reason I had to learn vi back in the day: sure, my machine has lovingly customized emacs.. But that old Sun one needs to debug? Vi only.)
- freedomben 5y agoFor that you have to standardize on bash compatible. It's ok if the exact command/syntax isn't in muscle memory. I've worked with a number of "alternative shell" fans and one thing that nearly everyone agrees on is that "bash compatible" is the lingua franca and the standard.
- icedchai 5y agoI worked at a place that was forcing zsh on its developers, mainly because it has been "deprecated" on mac OS. It's not like you couldn't install the newest bash off of MacPorts or brew. Production ran on Linux, and zsh wasn't installed there. Better to be consistent, stick with the least common denominator: bash.
- raffraffraff 5y agoMany years ago I had to write a script that ever developer in the company would occasionally have to use. After running into compatibility issues with python and bash I went for zsh, and never heard a single complaint. I still use bash as my main shell, out of habit (and because I know it'll be installed on whatever remote server I connect to) but zsh isn't so different. It's array syntax, for one. And figuring out what directory "this script" is in, regardless of `pwd` output, is easier.
- jeroenhd 5y agoThat's why you can pick your favourite shell for your user account. If you all log in to the same account, you'll need to pick some standard. It doesn't really matter if the system decides on that standard or if you just ask the team what they prefer and pick the most popular shell. When in doubt, install all shells, log in to sh and let people start their shell of choice.
- znpy 5y ago> That's why you can pick your favourite shell for your user account. nobody cares about user accounts. use whatever you want on your laptop, nobody cares. however if a script reaches a production server, it should either be sh, bash, or a real programming language (python/ruby/perl/whatever). the ugly stuff i've seen is that some snowflake user drops their scripts written in ${shell_of_the_week} and leaves, the script breaks and now i have there's this thing that has to be not only fixed, but possibly rewritten from scratch.
- hedora 5y agoI'd caution against python in prod. In addition to supply chain issues with pip ("pip install" in prod is foolish on the best of days), python libraries love breaking compatibility. The "one off" script from two years ago that you really, really need right now probably won't work. Perl/bash are less likely to hit this (they stopped changing years ago). It's an open question whether golang will have this problem.
- hedora 5y agoYou shouldn't have a user account on prod machines. Typically, there's just the user the service runs as. If it's in the cloud, the "machines" are containers. If your company sells on-prem stuff, there's a good chance it's an appliance that's owned by someone else. If you operate your own data centers, then you need to do configuration management of the machines, so their configurations are immutable/reproducible. (These problems all arise once you have a large fleet and a large ops team.)
- 5y ago
- patrck 5y agoTyping directly into a shell is a smell for teams that manage unwieldy-without-automation amounts of machines. Shells are just REPLs; use your editor to drive them. This helps document what exactly was done on a machine, and encourages code re-use (yank-put from last time) and other tidbits you get when editing (git repos, git search, etc.).