3 ms·
Automating stuff at the command line is super important. If it's easier for you to do in Python, then that's fine. I use awk and bash for a lot of that stuff
by aidenn0 14y ago
Automating stuff at the command line is super important. If it's easier for you to do in Python, then that's fine. I use awk and bash for a lot of that stuff because it's what I happen to know.
Other people I know use perl. The important thing is to be able to automate anything non-trivial that you will do more than a single-digit number of times. One time I spent 30 minutes writing a script for things that a dozen people were doing a dozen times a day. It maybe saved a minute each time, but that's over 2 hours in the first day we had it. It paid off in time for me in 3 days, and probably less than that it terms of "damnit this is boring"
For me, at least, Python has a much higher friction to get from "here's the list of what I do" to "here's an automated version"
I do use Python for some of the more involved things (manipulating timestamps from bash is a pain), and I've converted some bash scripts into "real language" scripts when things started to get hairy, but most of the time, you get 90%+ of the time savings from the first 1% of effort.
- codewright 14y agoPython scripting is an investment, eventually it becomes as frictionless as bash scripting. Especially if you have a good shell scripting library. I usually use Fabric, SaltStack, or https://github.com/kennethreitz/envoy https://github.com/kennethreitz/envoy