been looking at video 15 and now time for 16, before that just wanted to say not even my teacher thought me linux that well. you the man when it comes to bash
I watched whole series and I really liked it. You can explain complicated topics. Will you add next episodes to series? I feel like some elements where not discussed in deep like adding flags. I would love to see more episodes for semi advanced users who want to learn more. It's hard to find such content online since most people skip it or only do basicis.
because $() is a command substitution which will run $(lines-1) in a subshell. (()) denotes mathematical operation. So in other words $((lines-1)) means "do the math and use the result here"
Parameters are the names listed in a function definition and arguments are the values passed to a function - if you google arguments vs parameters there's some good info.
@@ethanrivers4057 Your script runs the operation on an empty parameter and then decides it shouldn't have done anything. No big deal on the simple thing you're doing in this case, but on a large and elaborate script you'd waste a lot of CPU. Make the error check the first thing the script does.
@@MichaelDeBusk I do understand where you’re coming from, you’re right. I have a script in production that does a back up and before the operation I check that it can be done.
been looking at video 15 and now time for 16, before that just wanted to say not even my teacher thought me linux that well. you the man when it comes to bash
I watched whole series and I really liked it. You can explain complicated topics. Will you add next episodes to series? I feel like some elements where not discussed in deep like adding flags. I would love to see more episodes for semi advanced users who want to learn more. It's hard to find such content online since most people skip it or only do basicis.
If someone followed all your videos, #! /bin/bash
lines=$(expr $(ls -lh $1 | wc -l) - 1)
echo "$lines" would make sense. Kudos!
great course
thank you very much
I have another bug for this script
Give it a directory that does not exist
great vids. no fluff, all great examples.
Thanks, this will get me into linux commands more.
how to make it so -a or --argument can be parsed?
why no mention of $@
@@jeffreysmith9837 what is that
why is $((lines-1)) and not $(lines-1)
because $() is a command substitution which will run $(lines-1) in a subshell. (()) denotes mathematical operation. So in other words $((lines-1)) means "do the math and use the result here"
@@stanislavtodorov8705 thank you 💜
Is there a difference between arguments and parameters?
Parameters are the names listed in a function definition and arguments are the values passed to a function - if you google arguments vs parameters there's some good info.
I don't understand what makes it a good idea to put the error check after the operation.
What do you mean by after the operation? The check is performed by the if statement.
@@ethanrivers4057 Your script runs the operation on an empty parameter and then decides it shouldn't have done anything. No big deal on the simple thing you're doing in this case, but on a large and elaborate script you'd waste a lot of CPU.
Make the error check the first thing the script does.
@@MichaelDeBusk I do understand where you’re coming from, you’re right. I have a script in production that does a back up and before the operation I check that it can be done.
well it does not matter here really it is just a list command and the final output is not printed , but as you say it will be better at the top.
Thank you very much
Tnx superman❤😊
Great video THank you
thanks so much
good video
keep it up i like your content
👍Thanks!
☯🙏
Arguments.