i am professional with 11 year experience but i still love your all videos and keep watching them daily the way you explain basics... just addicted for learning.
Great video. I watched it last month when it was new. It came back to me as I was moving a bunch of files and directories around. Typing out directory names can be tedious even with autocomplete. I used what I learned in this video to create variables of the directory paths. It instantly made things so much easier. I could not only copy things around faster, I could also move around to the directories I stored in variables faster.
Outstanding! Thank you so much for your videos. I always learn something from you. I knew quite a bit about shell variables and even the env command. I've used the $(command) before, but more as a script-kiddie (copy/pasting what I've seen others doing online) and never knew that it opened up a sub-shell to run the command within the parentheses. Please keep up the good work!
Don't sweat the ALL CAPS. Many early computers (and in fact the first typewriter) used only all caps. Using lowercase or mixed-case letters tends to complicate things. Merry Christmas!
Why do newlines disappear inside the variable at 13:30? That does not seem very consistent, imagine if other things you don't know (obviously not normal characters??) could also disappear.
The newlines are still in the variable, except for the very last one. The problem I have with this video is that you always (except when you don't, but that is very rare) want to use variables inside double quotes. So if our host had used echo "$file_list" we would have seen the output in the way that was expected. To dive a little deeper, if the variable is used outside double quotes then it is split into words, and the echo command outputs each word it is given separated by a space. This also means that multiple spaces and tabs get removed, and then echo puts a single space back. msg="Hello World" echo $msg Hello World echo "$msg" Hello World Bash does have sub-shells, which are created with "(" and ")". The thing that is created with "$(" and ")" is a different concept called "command substitution". Whilst this is clearly an introductory video, I think that with a length of 18 minutes it could also mention arrays. The syntax for them is fairly horrible but they needed to be added in a reasonably backward compatible manner.
It should be interesting to see how this subshell-capture trick will work with some output more sophisticated than "ls" and all that. If it can actually capture htop in any meaningful way it would be handy to grab it for log purposes. Dunno, but there is a lot to test.
If you declare it in .bashrc it will be available in every new terminal session (you have start a new terminal after you add your command to se the variable)
Need? That depends If a program isn't launching at all or isn't launching correctly ( be it Linux , Mac, or Windows ) you can launch that program via a command prompt or terminal and you can then SEE....WHY. ;) Another scenario = a script that can completely setup and install all programs in your PC if you ever need to do a clean install ...starting over....and in the end..save literally...DAYS of work doing it all manually by hand. Instead...you'll end up doing it manually by hand.....once maybe twice..and make notes into the script. These are just a few of the many good scenarios where a command line and/or shell can be invaluable.
That path-variable had a / at the end. I therefore expected $mydir/hello.txt to have two / before the file name and throw an error because of the invalid path. Seems like linux ignores unnecessary slashes - interesting curiosity.
i am professional with 11 year experience but i still love your all videos and keep watching them daily the way you explain basics... just addicted for learning.
Thanks
Great video. I watched it last month when it was new. It came back to me as I was moving a bunch of files and directories around. Typing out directory names can be tedious even with autocomplete. I used what I learned in this video to create variables of the directory paths. It instantly made things so much easier. I could not only copy things around faster, I could also move around to the directories I stored in variables faster.
Outstanding!
Thank you so much for your videos. I always learn something from you. I knew quite a bit about shell variables and even the env command. I've used the $(command) before, but more as a script-kiddie (copy/pasting what I've seen others doing online) and never knew that it opened up a sub-shell to run the command within the parentheses.
Please keep up the good work!
Don't sweat the ALL CAPS. Many early computers (and in fact the first typewriter) used only all caps.
Using lowercase or mixed-case letters tends to complicate things.
Merry Christmas!
Pretty cool how I was learning about Python variables and you dropped this. This is cool. I feel like I can really get things more organized.
Thanks!
6:40 You should have ls'd a directory with something in it for this example.
Amazing explanation, thank you!
Why do newlines disappear inside the variable at 13:30? That does not seem very consistent, imagine if other things you don't know (obviously not normal characters??) could also disappear.
The newlines are still in the variable, except for the very last one. The problem I have with this video is that you always (except when you don't, but that is very rare) want to use variables inside double quotes. So if our host had used
echo "$file_list"
we would have seen the output in the way that was expected. To dive a little deeper, if the variable is used outside double quotes then it is split into words, and the echo command outputs each word it is given separated by a space. This also means that multiple spaces and tabs get removed, and then echo puts a single space back.
msg="Hello World"
echo $msg
Hello World
echo "$msg"
Hello World
Bash does have sub-shells, which are created with "(" and ")". The thing that is created with "$(" and ")" is a different concept called "command substitution".
Whilst this is clearly an introductory video, I think that with a length of 18 minutes it could also mention arrays. The syntax for them is fairly horrible but they needed to be added in a reasonably backward compatible manner.
It should be interesting to see how this subshell-capture trick will work with some output more sophisticated than "ls" and all that. If it can actually capture htop in any meaningful way it would be handy to grab it for log purposes. Dunno, but there is a lot to test.
Thank You...
Thank you.
Thank you
Another great episode
What ur font name please?,
Subscribed !
what text font is this ?
Is it OK to download say your bash course videos as a reference to use offline? If not where can I purchase a licence?
I've downloaded all learn Linux tv. UA-cam-dl
Why do we call Shell a "Shell". Is it because of the concept of "Sub-Shells"?
Because it's a shell around the OS, i.e. the outermost layer that a user interacts with. Shells can be command line or graphical.
good video
If I want a variable to be available every time I open bash, is there a way to persist them?
If you declare it in .bashrc it will be available in every new terminal session (you have start a new terminal after you add your command to se the variable)
@@gumse666 Thank you! I’ll give it a try.
Nice video , did not know about sub shell
👍
👏👏👏
Sir add some videos with no-ip server setup
Please help. Why does Linux need a command line and a shell. Windows stopped using DOS ages ago
powershell on windows?
To answer your question: It is usefull, if you do not want to do things yourself and want to have full control over the system.
Need? That depends
If a program isn't launching at all or isn't launching correctly ( be it Linux , Mac, or Windows ) you can launch that program via a command prompt or terminal and you can then SEE....WHY.
;)
Another scenario = a script that can completely setup and install all programs in your PC if you ever need to do a clean install ...starting over....and in the end..save literally...DAYS of work doing it all manually by hand.
Instead...you'll end up doing it manually by hand.....once maybe twice..and make notes into the script.
These are just a few of the many good scenarios where a command line and/or shell can be invaluable.
That path-variable had a / at the end. I therefore expected $mydir/hello.txt to have two / before the file name and throw an error because of the invalid path.
Seems like linux ignores unnecessary slashes - interesting curiosity.
Thanks