3 ms·
aaah TLDP it is than, also that was pretty uplifting. Thank you so much for your time, guess one just cant go away from documentations.
by blobberdeen 6y ago
aaah TLDP it is than, also that was pretty uplifting.
Thank you so much for your time, guess one just cant go away from documentations.
- simonblack 6y agoI treat those two web pages at TLDP as reference material. There is nothing more boring and sleep-inducing than trying to read dry, factual information when you have no underlying reason to do so, as you have so rightly pointed out. That's why you give yourself some sort of project. Any project! It's the reason to use the reference material when you hit a problem you don't know how to fix. There's a reason for that old saying "Build one to throw away". By the time you finish your project, you will have learned so much that you will want to throw away that ugly first attempt and write it properly the next time.
- blobberdeen 6y agoabsolutely, also refs for bash on TLDP are for bash 3.x.x, will it still be good for 5.x.x ?
- 5c0tt-b0t 6y agoShells like bash/ash/dash etc are not updated often syntactically, so refs for 3.x.x will still be great reference. I totally agree with @simonblack 's great answer, its the "running into a problem and fixing it" which is the learning process (especially with shell scripting, that doesnt come with a fancy built in doc system, that modern languages have, but remember its shell, its not a modern language) you will find many "gotcha's!" along the way, remember them and not make that mistake again. As simon said, start small, work up, scripts should all be tasks, find some useful tasks you want automated, I have some that backup my PC and mobile devices, one to sync my music between all of them, one that can disable/enable apps on my phone/tablet. Someone who showed me the way once suggested my first script should be a PS1 prompt, till this day it was the best first project and one I'll suggest to anyone getting started as its fast, simple, fullfilling but you find many problems along the way I assure you! Start by making a prompt in format you like, then add some colour to it, make it multiline, add git status to it, write two functions "git_branch" and "git_dirty" and add these to your prompt command, add exit status indicating whether last command failed, make the symbol change if you are root, or make parts change colour instead, depending if you are root or command fails. I actually made a bash cheatsheet for reference when I'm scripting so that I dont have to search the web, it contains hyperlinks that take you to tldp which is the site suggested by Simon, the very bottom of the sheet has links to all the best refs you'll find on the net, thus answering your question, the markdown version is finished, I still need to convert it to shell script, pdf & html (I'll do it one day!), hope it helps: https://github.com/5c0tt-b0t/basheet https://github.com/5c0tt-b0t/basheet