+ 5

Should I learn Bash Scripting ?

I know basics of Python. I can write some scripts . I like playing with Termux & run scripts. I found scripts written in mainly python or bash . My Question is that should i or is it useful to learn bash or python is enough !.

11th Mar 2020, 6:46 AM
Twaatii
Twaatii - avatar
3 odpowiedzi
+ 4
Bash can be very powerful and efficient but is not very practical in every scenario. For using Bash it's important to know the Linux command line. Especially for common text manipulation Bash should be better and faster (because most command line utilities are written in C). Also when working directly with the OS (files, network, configurations etc.) Bash really shines. For example ls -R | grep .png lists all png pictures in the current directory recursively and didn't even need to write a script for this. For other sorts of scripts (also ones that include a lot of logic) Python is probably better. You can however write your own Python scripts for small problems that you can later call from Bash, so you can profit from both languages :)
11th Mar 2020, 7:30 AM
Aaron Eberhardt
Aaron Eberhardt - avatar
+ 3
Niirmaal twaatii you could try this tutorial: https://linuxconfig.org/bash-scripting-tutorial It's also good to know the most important commands on this list: https://en.m.wikipedia.org/wiki/List_of_GNU_Core_Utilities_commands
11th Mar 2020, 7:50 AM
Aaron Eberhardt
Aaron Eberhardt - avatar
+ 2
Aaron Eberhardt Please give me some useful links to learn Bash 🙂 Websites or YouTube Videos, Channel
11th Mar 2020, 7:36 AM
Twaatii
Twaatii - avatar