r/learnprogramming • u/The_Slippery_Iceman • 2h ago
Code Review My very first bash script
Hi everyone!
I've recently (around 3 weeks ago) developed an interest in cybersecurity. A friend of mine suggested me to learn bash scripting before going further into programming languages.
Some days ago I've found the roadmap.sh site and today I've completed my very first script/program of my life! It's hella fun but also kind of an overall-hell (it took me 6h and 20m to complete), but I guess that's because this is not my job (I'm a builder) and I'm still a complete beginner.
I've completed the first project and as said by the site, posted it on GitHub. Here's also the roadmap link to the solution which I don't know why but seem to ask for ten upvotes? (If someone knows what's going on explain to me please).
Could someone give it a look and tell me if it's good?
To be honest all of this has made me pop up even more questions:
- I often find myself going around all over google to find something that if I modify it enough could be a solution (at some point I had +45 tabs open). That's because I really can't remember syntax and sometimes I make stupid mistakes. Is this normal and the good way of doing this and to learn?
- Could you suggest me the best way to learn? I've done this project because it was flagged as "beginner" but tbh if I didn't look for answers I think I would have got stuck several times.
- Should one use AI to help himself? I dindn't but I don't really understand if it is considered "cheating" or not?
- Do you guys actually learn all the syntax by memory? Mine really sucks and I'm having trouble remembering all the flags for each command
- How would you have improved this?
Thanks in advance for you help :)