Brain Overflow

Leveling Up My Bash Skills

Congrats, you completed the challenge!

I've started to do little 'sprints' where I focus on levelling up a particular skill. It's going pretty well! Much better than trying to chase twenty rabbits.

Recently I did one focused on bash, and I found it really fun and helpful. Broke a few barriers that I had just never cracked before by using Exercism and cmdchallenge.com.

On occasion I'd open the cmdchallenge site and try to get as far as possible when I had some downtime at work...but I never had time that way to actually learn much beyond what I already knew. This time, since I was doing a 'sprint', I tried my best to actually finish all the tasks. And I did!

Pre-Challenge Skills

I'd describe myself before this 'sprint' as comfortable with the basics, like using all the tools that might get brought up in a Linux fundamentals course. Your ls, grep, ssh, tar, relevant package manager (dnf), etc. I already knew many bash shortcuts, like !* and !!.

I've daily driven Linux for years, but I just never really had to write bash scripts or really do anything beyond basics mentioned above for myself. Certainly not the types of tasks that cmdchallenge simulates, like parsing logs. Definitely tasks I do on Windows for my job, but never with bash. That's part of why I appreciated cmdchallenge so much, it felt like it really helped me fill in some gaps but in a way that would be useful working with/administering Linux in the future.

Prior to this, the most I learned about the shell from one resource had probably come from OvertheWire's Bandit, but cmdchallenge is a lot more suited for just improving use of bash + friends.

The cmdchallenge Experience

cmdchallenge helped me:

There's almost always more than one way to solve a challenge (some, though, are pretty much just variations on use of one particular key command). The most valuable part of the site may well be the community solutions drop-down.

Some of the challenge prompts I knew how to solve right away, but most of it was looking at something I didn't quite know how to do, but thinking "there is probably an option for this," or "awk can probably do this..." and then figuring it out, or trying my best and having to peek at solutions (or google a more general version of the problem) before giving making my own solution a shot. Nothing really new there (shocking, learning by doing--which really means wrestling with the work--works well), I can admit that. But there's something about it that felt way better than just following along with a book's examples (though sometimes, books have 'figure this out on your own' exercises that produce a similar feeling for me). It's probably the 'challenge'/game format...whatever it is, I would have actually paid for an extended set of tasks.

Also Great: Exercism

Exercism's bash track also helped get me writing bash scripts, something I was really feeling the lack of experience in when looking ahead at the sort of jobs I want to pursue. My favorite thing about Exercism is probably the CLI available so that you can work locally instead of in the web app. Bash's track doesn't have a 'learning mode' where Exercism provides its own learning material, but I didn't really feel I needed one (the same can be said for any track where there are sufficient beginner learning materials elsewhere). I filled in the gaps with man and Stack Overflow posts mostly, though I was also reading How Linux Works and The Linux Command Line.

What's Next?

I would like to come up with a list of tasks that I could work on to carry on beyond cmdchallenge. "cmdchallenge extended"?

Other than that, semi-official plans for the next bash-focused sprint are to continue with the Exercism track, the book 'Advanced Bash Scripting', and finish reading How Linux Works and The Linux Command Line.

Until then...

I'm currently just working on beating Bandit. I love that game too, and since I just got to a level where I actually have to write a script to clear it, it (and other wargames and the like) will probably be a good place to maintain/sharpen my bash skills.

My current sprint is Docker-focused, I'll also be posting about how that goes 🐋

#bash #linux