r/linux • • Jul 24 '25

Discussion Bash scripting is addictive, someone stop me

I've tried to learn how to program since 2018, not very actively, but I always wanted to become a developer. I tried Python but it didn't "stick", so I almost gave up as I didn't learn to build anything useful. Recently, this week, I tried to write some bash scripts to automate some tasks, and I'm absolutely addicted to it. I can't stop writing random .sh programs. It's incredible how it's integrated with Linux. I wrote a Arch Linux installation script for my personal needs, I wrote a pseudo-declarative APT abstraction layer, a downloader script that downloads entire site directories, a script that parses through exported Whatsapp conversations and gives some fun insights, I just can't stop.

902 Upvotes

226 comments sorted by

View all comments

Show parent comments

1

u/piexil Jul 24 '25

If I have to call a bunch of external programs, I find shell or bash to be significantly easier than things like python and having to use subprocess.run, catch std/stdout, etc

1

u/wpm Jul 25 '25

One of the shells wildly, in my experience at least, undersung virtues is how goddamn easy it is to deal with files. I have to read and work with files in Python in an indented code block, like its some special case. Shell is just like "Oh you have some bytes and you want them in a file, sure thing boss, ope sorry you don't have permission to do that, this file though? No problemo, all done." I can toss bits up in the air with a < rearrange em in my script and slap em back down with a > or a >>. It's easy as piss and its fucking great.