How to Get Started with Bash and Practice Problems?
Asked by
drumstick grip
I've been coding in Python on Windows for a while now and it's become my go-to programming language. However, I've been considering branching out into another language, specifically C or C++. Recently, I installed Ubuntu on WSL to get a feel for it, and my friend started showing me the ropes of Bash scripting. I've found it surprisingly fun to write! It's not only enjoyable but also pretty useful because I can create functions for navigating my terminal and set up new aliases. I'm looking for some beginner-friendly practice problems to help me improve my skills in Bash. Any suggestions?
Answers
There are loads of Bash tutorials out there! Just be careful as some might include contrived examples. One helpful resource I'd recommend is the GitHub page for awesome Bash resources. Itโs got a collection of good bits you can dive into!
Reply to this answer
I actually wrote a beginner's book on Linux CLI tools and Shell Scripting! You can find plenty of examples and exercises in it. If you're interested, hereโs the link: learnbyexample.github.io/cli-computing/command-line-overview.html. Plus, I have a curated list of resources as well for extra practice.
Reply to this answer
Check out the Bash Guide on mywiki.wooledge.org. I plan to go through it someday myself; I've heard itโs quite comprehensive for beginners.
Reply to this answer
Using WSL isnโt the most reliable way to learn Bash, but it is powerful! Bash can compose any executables through pipelines using the `|` operator, which is quite elegant. If you want to practice, I suggest exploring older C-based utilities via your package manager. Youโll see how you can simplify your workflow really well! Python is definitely more verbose, but Bash has its strengths for quick scripting.
Reply to this answer
Add your answer
Answers are reviewed before publication.
kitchen_scales: Totally agree! Combining Python and Bash can create an awesome workflow. I can call my Python scripts directly from Bash now, which is a game changer compared to setting everything up in the Windows terminal.