3 ms·
Sure, but relying on custom shell scripts as unix primitives can be problematic if you find yourself frequently managing/troubleshooting systems that you don't
by cholmon 7y ago
Sure, but relying on custom shell scripts as unix primitives can be problematic if you find yourself frequently managing/troubleshooting systems that you don't own, and you don't want to (or aren't allowed to) put those handy scripts in place. Then when you're on any given system, you forget whether you can use "f", or if you have to fall back on awk.
I think it's less about not trusting custom scripts than it is about ensuring that your unix muscle memory doesn't atrophy.
- andrey_utkin 7y ago> if you find yourself frequently managing/troubleshooting systems that you don't own You start thinking about packaging.
- Galanwe 7y agoPackaging what? I would be mad at any admin that would dare to deploy his helper shell scripts like “addup” and “count” on a machine other than his laptop. And if you meant he could just have these things in his home, then it defeats the purpose of the original comment: trouble shooting and administering machines forces you to often switch user, machine, etc.
- dtoma 7y agoIf a company has recurring troubleshooting issues, eg. "we need to know which process is taking all the CPU/RAM/IO", why wouldn't they add a script when they provision their machines with puppet or whatever tool they use? Then instead of having to remember how to check all these things, they just run "find_resource_hogs.sh" and voila. It also enables other people to troubleshoot without specific knowledge. Of course you don't want to put anything in there just because it might save 10 seconds, but then https://xkcd.com/1205/ https://xkcd.com/1205/
- Galanwe 7y agoI agree 100% with you. I spend a lot of time moving around different machines, processes, configuration files, logs, etc. And I stopped maybe 10 years ago to use anything that is not available on a base system. I don’t use fancy shells, I don’t use aliases, I don’t write local shortcut scripts, etc. I just use regular bash, combine base utilities in one liners, and live with it. Maybe I loose 1s here and there when writing one liners compared to someone with a library of wrapper utilities. But that gives me an immense benefit: I am at home on any machine, any distribution, everywhere, without any configuration, with any user.
- blunte 7y agoThere's always something like Ansible (or even a lower-tech solution) to at least give you the basic toolset that helps you double or triple your performance.
- Galanwe 7y ago> that helps you double or triple your performance. Sure, in a quest of productivity, I should also use Vagrant and Packer to create docker images with a development environment so that I can run Serverless troubleshooting containers on all my machines. These scripts will surely help me triple the performance of my bash one liners. I’ve heard Eclipse has good shell completion and support for oh-my-zsh too.