There Is no need for semicolon if newline Is used. Because newline and ; have a pretty similar effect in bash. Both ways are correct: If [ condition ]; then If [ condition ] then
Good job mate. Ive just started a course on udemy suppose to be for complete beginners, which i am. Unfortunately the guy isn't explaining things very well for a complete beginner. I'm really enjoying the slow pace and how you explain things.
@3:35 5 errors in 5 lines of code? 1. The space after `if`is NOT optional. 2,3. single square brackets need spaces after opening and before closing, so it would be `if [ condition ]`. 4. The semicolon at the end of the line is superfluous, since it is a replacement for a newline, mostly used interactively. 5. The body of the if-statement is not a condition, but one or more statements. Later: You should not use ALLUPPERCASE for your shell variables, but have them reserved for the system. (Only a recommendation, not an error). You needn't mask "Alexis" with quotes, since it does not contain blanks or something else, which needs to be quoted. Quotation marks aren't markers for strings. Using them is again not an error, but it leads newcomers to the wrong assumption, that they are similar to other programming languages. They are not. The same is true for `echo Welcome Alexis`. Here you HAVE a blank, but echo will put a blank between any two parameters by itself. Just if you happen to use 2 or more blanks, you need quotation to preserve them. @8:35 `read` has an option for prompting: `read -p "Please enter your name " name` (note the trailing space in the quote). You don't ask for the username, because that is already known and it is $USER. @11:40 AI is going wild! No, the password file (/etc/passwd) does not contain the hashed passwords, /etc/shadow does. And you can't unhash them, that's the purpose of hashing them. Instead, the token the user uses to login is hashed by the same algorithm and if the hashing of his input matches the entry in /etc/shadow, he is let in.
[5:25] That is not true. The space is needed in order for the shell interpreter to recognize correctly the "=" operator. No assignment can´t be made inside the [[ command
your doing a great job at breaking down each topic! thank you
It's very hard to find the absolute basics in one place. Thanks for making these videos!!!
This simple video helped me finish something far beyond more complicated. Thanks for the tips on spacing etc., it's what helped me finish.
There Is no need for semicolon if newline Is used. Because newline and ; have a pretty similar effect in bash.
Both ways are correct:
If [ condition ]; then
If [ condition ]
then
ChillerDragon
Thankx for the info
Both are incorrect, since you need a blank before and after `cond`.
@@unbekannter_Nutzer yes of course fixed my comment thanks
Isnt it true that you can also use: if [[ $VARIABLE == "1" ]]; then
echo "hi"
fi @ChillerDragon
@@iteachcyber5713 Instead of what? And why do you quote the 1?
amazing tutorial that finally helped me understand this concept after struggling with man pages and overly complicated blogs
You are my fav teacher , I learn a lots of things from your videos.
Keeping doing this.
Lots of love from india
Very informative. But you missed the nested part of if else conditions.
Good job mate. Ive just started a course on udemy suppose to be for complete beginners, which i am. Unfortunately the guy isn't explaining things very well for a complete beginner. I'm really enjoying the slow pace and how you explain things.
4:22 Hahahahaha. This part was funny. 😂😂😂😂😂
Thank you so much for the video. :)
Yes :) you're right nano is easy and simple
Great work Alexis!
Thanks for these intro videos. Much appreciated!
Hsploit my hacker guru, you rock man!
This helped a lot. Thank you.
Starts at 2:28
Amazing series!
@3:35 5 errors in 5 lines of code?
1. The space after `if`is NOT optional.
2,3. single square brackets need spaces after opening and before closing, so it would be `if [ condition ]`.
4. The semicolon at the end of the line is superfluous, since it is a replacement for a newline, mostly used interactively.
5. The body of the if-statement is not a condition, but one or more statements.
Later: You should not use ALLUPPERCASE for your shell variables, but have them reserved for the system. (Only a recommendation, not an error).
You needn't mask "Alexis" with quotes, since it does not contain blanks or something else, which needs to be quoted. Quotation marks aren't markers for strings. Using them is again not an error, but it leads newcomers to the wrong assumption, that they are similar to other programming languages. They are not. The same is true for `echo Welcome Alexis`. Here you HAVE a blank, but echo will put a blank between any two parameters by itself. Just if you happen to use 2 or more blanks, you need quotation to preserve them.
@8:35 `read` has an option for prompting: `read -p "Please enter your name " name` (note the trailing space in the quote). You don't ask for the username, because that is already known and it is $USER.
@11:40 AI is going wild! No, the password file (/etc/passwd) does not contain the hashed passwords, /etc/shadow does.
And you can't unhash them, that's the purpose of hashing them. Instead, the token the user uses to login is hashed by the same algorithm and if the hashing of his input matches the entry in /etc/shadow, he is let in.
You're great, thank you.
Love your vids 💖
Thank you!
Cheers Mate.
thank you bro, its awesome
Awesome tutorials, keep it up please ;).
Such a tutorial. Great job man:)
[5:25] That is not true. The space is needed in order for the shell interpreter to recognize correctly the "=" operator. No assignment can´t be made inside the [[ command
Thankyou so much
Great video
Awesome ❤
Does the variable we are checking need to have quotes?
Sir only unary operators can work in "if condition" ?
How we can use binary operators like (=) in if statement ?
How do you calculate 3^2 in using NASM? I have not been able to find a good explanation. Have you got a video you can share?
I don't know for NASM, but in bash, it is ((3**2)).
Thank You
Thanks a lot....................... for this.......
thanks
Good video.
Hey hackersploit, is there an elif statement in bash. If not, how to do that???
This is great
thx bro
He uses 'condition' when he means 'statement' after if.
It's a nice tutorial
In my windows this code is not running what to do
Sir in my system not working showing some errors
Command not found
Hey man ..I am getting a error when I run the script
It asks for input and then says "syntax error: unexpected end of file"
elliot be like : Hello Friend
Is there an else if in bash?
Arnav Jain yes its called elif
Yes, i will be covering that next.
Please teach us how to make hacking scripts in python
are you now 45 ?
Ha moj ha
26th ❤️
epic
First one!
🃏🃏🃏🃏🃏🃏🃏🃏🃏🃏🃏🃏🃏🃏🃏🃏
pls look at your email.
999
Thank you so much for this video