[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
As I started to use Linux I realised I need to be proficient
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 10
Thread images: 1
File: 13512201.jpg (54 KB, 800x758) Image search: [Google]
13512201.jpg
54 KB, 800x758
As I started to use Linux I realised I need to be proficient with Bash and Python/Perl.

If I want to write my own system scripts, is Bash more preferable to Python? What are the pros and cons? Also, does python has code completeion like Bash/Zsh?

I am very new
>>
>>55579216
Sorry for the typos as well
>>
>>55579216
INITIAL D
>>
bash is mainly used for small things.
Python is generally used for applications that are a little bigger.

There's no rule, really. You use what you want. There are some very small scripts written in Python and some enormus bash ones.
>>
>>55579216
bash is rather inelegant, so I'd recommend keeping smaller/simpler stuff in bash and using python for larger scripts
>>
>>55579216
bash works on pretty much any linux system out there, save for maybe a few IOT or extremely minimalist things.

Python will only work on things with python, and you might run into issues regarding python version.
>>
>>55579357
this
>>
You need both. Bash is relatively simple. You can pick it up as you go along. Python on the other hand is more complex.

Depends on what you're using it for. What kind of system scripts. What're you doing with them? Auditing networks? Or just trying to optimize your newsfeed. Smoking meth or whatever.

But the idea is that you need the syntax in order to actually be able to use it. Choose one, and stick with it. Python is nice in the sense it's relatively simple, yet allows you to learn the syntax well enough to actually get a grasp of other languages when you decide to branch off
>>
As a developer I would say this. Knowing bash is next to essential. Knowing Python is not essential, because you can substitute Python with plenty of other high level languages. You can't do that with bash because (unlike Python) it's pretty much universal at this point in time. No matter where you work, if they do anything with Linux, there will be times you will be working with shell scripts, and they will most likely be of the bash variant.

It saves time, and the amount of actual work that you can automate with a script is incredible.

That said Python is a neat little language and there's nothing wrong with learning Python. I just wouldn't consider it essential (unless you happen to be working somewhere that uses Python.)
>>
>>55579816
>>55579954
Thanks anons
Thread replies: 10
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.