This is the best shell scripting tutorial I can find across the internet. well paced, explanation of every single term and concept and not just vaguely using it without an explanation to back it, thanks a lot for putting this together, I really appreciate for doing this.
When I heard your sad background story I knew this is the guy I have been looking for. I'm going to chill here until Im a senior Linux engineer. Thanks a million Sir
I was about to leave a comment about the quotes (and how double quotes allows for variables replacement and single quote don't), but I'm glad I waited 👍🏼 Excellent video, as usual. Your channel is my Linux "cheat sheet" 😁
Some people might wonder how you could use the $-sign in the echo command given that the $-sign is used to call a variable. Use the escape-character \ in front of it. This applies in general if you struggle to use a character in a command, like the space or slash.
Nice video series. I find scope vexing. I used to try updating my $PATH in a bash script and run into problems. Or creating a variable in 1 script and using it in a different 1.😅
For New Bash Scripters: do not leave spaces between myname="Jay" in linux if you wrote myname = "Jay" linux will think it as a command and display unknown command error...
I have two questions... 1) Can we camel case method to create variable names like myUsername instead of myUsername. 2) Is it possible to escape the single quote using back slash... Like 'I\'m jude $USER'
SOLVED! So, how does one restore bash, once one has trashed it somehow? I accidentally figured out how to reinstall bash, which, apparently, you can't do WITHOUT bash, ROFL, which is EXTREMELY annoying! BUT - you CAN log into the folder with the reinstall scripts AS ROOT, in nemo or, maybe some other file managers as well - not sur - THEN leave the file manager open as root and reinstall with the package manager GUI. I intended to switch the offending file from bash to sh and then change it back but when I went to change it back after FINALLY getting bash to reinstall with Synaptic, I discovered I'd failed to save the changes so, the only other thing it could have been was the fact that I was logged into the folder in the file manager as root. SOOO - got my terminal back, got bash, got everything updated, everything's working and I can go back to playing with bash scripts! I still don't know how I broke it in the first place so I reckon I'll find out, in pretty short order. But since reinstalling bash is so easy now, who cares?!?! WHEEEE! If you ever want to know how dependent you are on bash, just break it. I was over a week with no terminal and it 'bout drove me nuts. I couldn't even make a bootable flash drive without it! Couldn't update, install or reinstall anything and, of course, no terminal - though I did get an sh terminal at one point, but that didn't survive my attempts to repair bash so I was totally terminal-less. Thought I was going to have to reinstall and reharden everything which is precisely what I wanted a bash script for - "auto-hardening".
i did on my Mac book terminal but that current date and time doesn't even displayed to me howeever I'm dissaponted totally to fix it several times i'm unable to do that .