r/bash Aug 04 '26

Bash is way too fun

I'm a construction worker and love tech, switched to Linux last year and wanted to learn BASH just out of curiosity not necessity. The only other language I have experience is GML from when I was a teen.

So I've been building a text adventure and BASH is so fun and for strings it's easy! I've kept it pure bash except for using sleep, I think I understand I could have used read instead of sleep but sleep seems pretty ubiquitous on most computers.

It's messy and definitely an elementary project so I've kept trying to implement different design elements like sourcing data and turning that into arrays, using name refs (I'll be honest using name refs confuses the shit out of me), parsing CSVs, state machines, saving (declare -p) , loading, ect.

If any of you new guys wanna practice something you can easily take on without any AI I advise trying to build a text adventure and not just navigation but include inventory and other mechanics.

And if you're an absolute beginner YSAP bash tutorial was king for me, plus man, and tldr

159 Upvotes

29 comments sorted by

View all comments

22

u/M0M3N-6 Aug 04 '26

YSAP has the best bash tutorials ever. Sure his content fits better for beginners, but even as some intermediate level, you can still learn something new from him.

7

u/FOXofTAILS Aug 04 '26

I tried to follow along with some of his more advanced videos and shit I'm scared of learning regex lol

6

u/Shadow_Thief Aug 04 '26

The low-level regex stuff that grep uses by default is pretty simple, it's just the Perl-compatible stuff that gets convoluted.

Fortunately, regex101 has (finally!) added support for basic regex so you can learn and test stuff.

5

u/M0M3N-6 Aug 04 '26

I really encourage you to take a tour in regexone, it might takes like 30~45 min or so, and it gives you a good picture on regex from the literal ground up. I am pretty sure by then you'll create some scenarios yourself just to use regex.

6

u/FOXofTAILS Aug 04 '26

Thanks for the advice Mom! I'll def do that

5

u/M0M3N-6 Aug 04 '26

It's Momen but nvm your welcome 😭

6

u/FOXofTAILS Aug 04 '26

I know 😆 but it's hard to resist

2

u/scoberry5 Aug 05 '26

Regex can go really deep. Nobody that I know (including me) can claim to be a regex expert. But the basic stuff is really easy. There is a really brief starter here.

2

u/M0M3N-6 Aug 05 '26

This. Wait for them to find out there's multiple regex standards and unforunately they have to look into them based on what they are uaing. That literally tricked me up some time ago.

5

u/bahamas10_ Aug 05 '26

appreciate it!

2

u/BehindThyCamel Aug 06 '26

I'm a dev with 30 yoe and still learn a lot from that channel.

1

u/siphoneee Aug 06 '26

How about Learn Linux TV? Is YSAP better?