I am currently trying to learn Rust, which (for now, at least) is more interesting to me. Consequently, I will probably not touch this repo for a while. I do still love Bash though, so I'll probably come back.
I name files after their original assignment number and content. For example, if the seventh assignment was about list
comprehensions, I would title my Bash translation a7-list-comprehensions.sh
.
To use the functions in these scripts you have to run source whatever-script.sh
. You can (but maybe should not) place
that line in your .bashrc
file, which would let you use these functions whenever you want. I don't think you should
chmod +x
any of these scripts unless you know what you are doing. If you run the scripts themselves rather than
functions in the scripts, I don't think anything would happen. Although, I don't know what I am doing, so this could
also break things.
I love Linux and Bash, and I think recreating all of my CS4 assignments in the latter would be a good way to learn it.
I do not intend for these scripts to be very polished; I am learning as I go. However, if I learn of optimizations, I
may include a new function with a name like better-[FUNCTION NAME]
. I might not recreate everything, as some of the
lessons from my CS class were about OOP, which Bash does not seem to support. I'll cross this bridge when I get to it.
Also, it is worth emphasizing that the original assignments were in Python, not Bash, so I don't think this would be
useful for cheaters.
Here is a list of resources that I have found helpful so far:
- The
info bash
command and its various sub-pages. - W3 Schools and Phoenix NAP for syntax help.
- Redowan's Reflections for understanding namerefs and the
declare
command.
None of the code in this repository is (or will ever be) intentionally AI generated; you do not learn to cook by ordering takeout.