Which is better for scripts?

Which is better for scripts to use with Linux, python or bash.
March 20th 20 at 11:28
6 answers
March 20th 20 at 11:30
Depends on what difficulty depends on the environment. If you have Python and the script is quite complicated — of course Python. If the script is a pair of sed/awk/exec — bash. Well, if the environment is not Python (e.g. Docker container with nginx) — obviously, bash.
March 20th 20 at 11:32
depends on the possession of one or another language and the size(complexity) of the problem
if proficient in python and objective means of writing 200+ lines of code then it is probably better to use Python, otherwise bash will suffice for the eyes
March 20th 20 at 11:34
Depends on the purpose of the script. The challenge here is not so important as knowledge of the language and the meaning of the application.

bash - command language for system tasks. Convenient if you want to run an external application
Python is universal scripting language.

For example, the installer or Manager the script in General, it is better to write in the bash.
You need to add that script in Python may require additional dependencies. - Elva28 commented on March 20th 20 at 11:37
March 20th 20 at 11:36
Bash need to know just because it says all of the control scripts. Without it will never understand why say this place is the environment variable there, but no. Many many things become simple and clear, if you know it.
python for heavier scripts, for example where there is a connection to the database, complex transformations, working with LDAP/AD...(in this case, I use perl)
March 20th 20 at 11:38
I'm afraid that everything you want is already written for you, use DevOps tools to automate, such as ansible, soltstack, etc., if something simple will focus on bash.
March 20th 20 at 11:40
What is a good writer and write on that)) even in PHP)

Find more questions by tags LinuxPythonbash