I … I think I'd like to learn bash? Do you have any tipps on how to do that? Or should I rather learn python ("automate the boring stuff")?
@jollysea if you value your remaining brain cells, do only very simple stuff with bash.
@jollysea depends on what you want to do with it. I like Bash for short snippets of code and because it gets really annoying once it gets larger than a few lines, so I'll be forced to use a real language for the complicated stuff. Python has a similar thing once you start getting into OOP stuff
@noiob I want to do simple stuff like "transfer all files older than x from this folder into this folder via scp"
@jollysea that sounds doable in bash, yeah. I don't really have any specific source, I just search for whatever I need to do at the moment or look at man pages. To get all files older than x I think man find can help you
@jollysea basically what you wanna learn first is how pipes work bc that's how you do cool stuff in bash quickly

@jollysea
Bash is nice because of its iterative programming methodology.
Do one command.
Ok works.
Pipe into another command to drill down.
Works as well.
Pipe ...

Until you have a dozen pipes concatenated together giving you the wanted result.

Python is good if you have structured data (json csv, xls, xml, html...)

@gunstick @jollysea I second this view. My usual progression is: bash one-liner (mostly pipes and loops, a little bit of subshell), then a collection of these oneliners in an executable file (usually Makefiles for my own weird reasons. I'd recommend justfiles nowadays even though I don't use them yet) and then python scripts and finally python projects.
benefit of bash is: quickly run something in a lot of places, calling random simple things like bash -c "for f in $(ls .config/); do echo $f | ts; done" is powerful.
benefit of python: way more helpful to debug, way less painful mistakes, and way better handling of complex data

I learned a lot of nice tricks through the wizard zines and comics for bash: https://wizardzines.com/comics/

Wizard Zines - Comics

wizard zines
@themoep @gunstick thanks! I do have the wizard zines, they are great!

@jollysea hold on, I have some stuff for you.
I'll edit this post once I have it.

Edit:

This might be useful
https://github.com/dylanaraps/pure-bash-bible

I got it from this video (the channel has other interesting video around the topic)
https://www.youtube.com/watch?v=Jllnhid7O7w

One liners are good way to learn about commands and way to do things
https://www.bashoneliners.com/oneliners/newest/

I've not use it, but code golf can be a fun way to learn, here is some tips to use code.golf with bash
https://code.golf/wiki/langs/bash

On the more boring side of bash (permision etc), there is a ton of good material for the RHCE or now RHCSA exam, some will cover bash, builts in etc.:
https://www.redhat.com/en/services/certification/rhcsa

GitHub - dylanaraps/pure-bash-bible: 📖 A collection of pure bash alternatives to external processes.

📖 A collection of pure bash alternatives to external processes. - dylanaraps/pure-bash-bible

GitHub

@jollysea

knowing how to do basic stuff in bash is very helpful in general. the moment im Tempted to define functions in bash i usually switch to something else though.

but in the end, at a certain point programming is programming. Different Languages make different things easier and sometimes use different abstractions but in the end learning one will make learning the next one easier becsuse the "how do i make the computer do this thing" partis pretty transfetable.

@jollysea Bash is a easy thing for some scripting.. and there is the Advanced Bash Scripting Guide at TLDP: tldp.org/LDP/abs/html/

Python will take a good amount longer and will possibly go deeper into programming..

So maybe do it in that order? ;)

(Knowing bash might help for example to understand python venv (virtual environment) handling and such. ;))

Advanced Bash-Scripting Guide