Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
As python is a general purpose language, you can of course use it for anything.
I personally find it easier for small automation tasks to use Bash (e.g. do backups, clean files) but for larger projects I use Python instead making a thousand line shell script.
The only downside is, some functionality of the shell commands are hardly available to Python or the results are difficult to parse.
In the end I'd still recommend you to learn some bash basics, as you may have to maintain an older script from colleagues once.
Additionally you cannot rely on the availability of Python in your desired version (I'm looking at you, CentOS!) or its packages. -
Yes.
Python helps with high level logic, and certain abstractions that bash as a script just did not care about.
Also - use an automation tool like ansible to manage your server - based on python. -
Natrocx406yDepends on what you are doing I guess. For Linux it should be fine since bash doesn't really have any extra functionally. Powershell on the other hand does some dark magic that you probably won't get to work without some significant effort. So unless you want to manage Windows servers I think you are fine with python.
-
c3ypt1c96546yPersonally I'm not a sysadmin, but i think that native implementations are usually better. However, if you want to do the same thing across platforms, I'd suggest Python.
Related Rants
Hello sysadmins, silly question but can I consider Python as a serious alternative to powershell/bash? I have always hidden myself from learning bash considering myself not that kind of guy hacking around in Linux. Thanks in advance
question
powershell
python
bash