Why the narcissist will always hate you they will always see you as their rival as Their competitor or opponent as someone who is competing for the same object or goal They will always hate you and they will always want to cause harm to you It's like their only purpose in life Is to cause you severe physical and mental suffering They only know how to assess the risks possibilities and effects of a situation or course of action They only know how to make plans in a devious way With the intent of doing something wrong and they have to be the person who is successful and dominant They have to be the person who is in a position of authority They have to be the best at something They have to be in charge They have to be the most important person They have to be all powerful and all-knowing But they're not really this badass threatening or intimidating person that you may think they are They're not as powerful or destructive as they may portray themselves to be Their disorder is based on fragility It's based on weakness and vulnerability That's what separates them from normal people They just invent an imaginary character So that they can cope and deal with certain situations They have no fighting them They just have a false sense of pride They pretend to be conscious of their own dignity They pretend to be proud of themselves They pretend like they're important for whatever reason But if that character fails, they will just abandon it And they will build a different character and personality They will play the victim They will act like you've done something wrong to them They hold no accountability for their actions Because they're no longer the character that they were before Now they're a different character So they just forget everything they've done And they learn how to cope with their past failures They can just switch off their character whenever they feel that it's favorable for them to do so Which is how they can avoid accountability for their actions They can say that they're not that person There's someone else, there's someone who isn't responsible for any of that Because this new character may be accepted by other people It's not being judged And for this new character to exist It has to receive admiration and praise When the narcissist targeted you They were looking for weaknesses They were looking for something you don't do well Because deep down they hate you Which is why they will never see you for who you really are They only see what they can take advantage of They hate anything powerful or strong Which is why they hate authority Because authority is powerful It has the power to make decisions and enforce obedience But although they hate authority They also respect it Because they see it as a threat They see it as something That has the ability to cope with their past failures That has the ability to cause danger or harm to them Because authority can expose them And there's nothing they can really do about it Which is why they hate authority Because they're very weak and fragile people They bully you They act like they're not worried or concerned about anything They're not changing their purposeful intention But they are affected by their narcissistic injuries Even though they may not show it They're very envious of other people That's what fuels them That's why they're never at rest That's why they can't stop Because they're constantly looking at other people And wondering how they can be determined and successful Without having to lie or exploit anyone Without being weak But they really believe that people are no different to them They don't believe that someone could really be a genuine person And still be successful in something Without having to resort to debauchery and dissipation Which is what the narcissist engages in They can't comprehend that They can't see how it could be possible Which is why they sit back and study the faults and weaknesses of other people So that they can attack them So that they can bring them down And they do this through devaluation Through the reduction or underestimation of the worth or importance of a person They will represent a person At less than their true value or importance So that the narcissist can feel like they're in control It might start off as something small and humorous So that it doesn't really startle you They always have to be better than you at something They will even lie Just to make you seem less important than you really are Because they want to make you feel like you're nothing They want you to think that you have nothing to be proud of They want you to think that what you've accomplished isn't a big deal Which is why they will be indifferent to your value and accomplishments They will act like they don't see it Or as though it doesn't mean anything to them You might mention something you have accomplished And they will say they know someone else who did that But they're lying to you They're just making it up To make you feel like what you've accomplished isn't a big deal By saying that a lot of people have accomplished the same thing or more than what you have They do this to minimize your true value and importance They're trying to tell you that you're not who you think you are But they don't do it directly It's done under the radar So that you can't confront them on it They ignore you They postpone their consideration of you They treat you as a low priority They withhold from you the proper attention and respect that you deserve Because they're trying to make you feel unimportant And irrelevant They want you to feel worthless They have to change your way of thinking about who you know you are They have to change how you view everything that you've accomplished And if they can convince you They can gain control over you They can break you down And still keep you around them Because a lot of the things they do They don't do it directly It's under the radar So you have to pay close attention to be able to catch it They will point out things they don't like about you They will say that you're doing something wrong Or that it's better to do something their way They will question the way you do things As though you don't know how to do anything Because they want to make you doubt your own abilities They want to make you think you can't do anything right Because that's how they break you down And gain control over you If you've gone through all of this with a narcissist And you still choose to stay with them They know you're under their control But it's not always about money or sex Sometimes they target people just to hurt them Just to break them down and then discard them It gives them satisfaction To feel like they're the top dog who has conquered you Which is why they will strip away your worth They will strip away your value They will strip away your dignity and pride They will strip you down And reduce you to nothing but a shell of who you used to be Just so they can feel like there's something more than what they actually are Thank you for watching I hope this video resonate with you Please like, comment, share And subscribe If you would like to donate My paypal link is in the video description Coaching the inquiries You can email me at coaching.nagciv.uk Thank you for watching And I'll talk to you soon


Marriage, the ability to marry, to say I do, is a basic civil right. It expresses the right of a person to have the liberty to consent validly. And this can be seen very strikingly in American history through the fact that slaves lacked that very basic liberty of person to say I do with the force that I do has to have. And what happened when slaves were emancipated? When slaves were emancipated, they flocked to get married. It was said by an ex-slave who had also been a Union soldier, the marriage covenant is the foundation of all our rights, meaning that it was the most everyday exhibit of the fact that he was a free person. No further questions, Your Honor. Mr. Cooper, you may cross-examine. In the 19th century, many Americans engaged in informal marriages, correct? That is true. And pregnancy or childbirth was the signal for a couple to consider themselves married, correct? Well, not always, sometimes. Well, let's look at public vows. Your book, which has been admitted, page 31. Page 31, you said? It reads, in part, marriage frequently followed upon a sexual relationship between a man and a woman, proving fruitful rather than proceeding it. Pregnancy or childbirth was the signal for a couple to consider themselves married. You believe that when you wrote these words, didn't you? Well, yes, but as I said, frequently, not always. And you provided a statement to the Vermont legislature when it was considering same-sex marriage? Not to the legislature, to their joint judiciary committee. I see. And when you provided that statement in Vermont, the law that resulted was a compromise between Catholics, gave something to Catholics and other conservative groups and something to the LGBT community, is that correct? It did state, in its first line, marriage is between a man and a woman. And then it went on to grant a civil union arrangement that gave all the rights and benefits to same-sex couples. Yes. Your Honor, we have no further questions. Thank you, Professor.


show greatness on the court, but also off the court, representing all of you with their success. However, we would also like to thank and recognize all the fans and the students and adults for their support and excellent sportsmanship for the girls' run. And here are your 2006, 2007 Lady Raiders. I have a facility to seat all of our students and guests. I believe many other student achievements will be celebrated in a similar manner in the future. Bringing home a state championship trophy is a great achievement worthy of this gathering. Yet from my perspective as principal of this great school, today's assembly is about more than basketball. Lady Raiders, through your dedication and victories, you allowed North High School to show our class, our cheerleaders, drumline band, dance team, our student body, and community at large. WIAA executives, other schools, and people from around the state went out of their way to congratulate us and you, you as basketball players and you as people. You showed a competitive mental toughness, yet we're all so kind and caring. You showed a keen focus, yet we're able to see the big picture. You had individual talents that were melded to become a team. You are a model for all good things that North is and has to offer. To the parents present today, thank you for entrusting your daughters to our care. You have much to be proud of. Coach Runes, thank you for allowing me to say a few words to your team after Saturday's game. The bond you and your assistant coaches have with the girls and they with you will last for years, if not forever. It is my sincerest wish for the Lady Raiders to continue to show us how to be mentally tough, yet kind and caring, have a focus, yet keep track of the big picture, and how to take our individual talents and meld them into a team. Just this afternoon, Mr. Stangle received the following. I'd like to read a few of these. Way to go. Dear Coach Runes and the Lady Raiders, congratulations on a great season of basketball. Here are some letters from my second grade students. I hope you will enjoy. Sincerely, Cheryl Driscoll, second grade, shared in elementary. Midwinter, I believe the Churchill girls would remember. I called them to the office. They thought they were in trouble again. But midwinter, I had a chance to visit Cooper Elementary School, where my wife teaches, to a second grade. And I had my North High stuff on, and the second graders said, do you go to North? Yeah. Do you know Shelby? Do you know Dana? They live near us. They used to go to Cooper. And then the other kids said, Shelby and Dana go to North High School? How many students do you have at North? 1,600. Another little boy raised his hand. How tall are they now? I said, how about this tall? They were, ooh. So that was an early indication during this season how much the girls did more than just basketball, the impression on the elementary school kids. I called them in. I said, do you know? This is the type of impact you have. And I believe the other girls have the same type of impact in the schools once they came. Now, here is the most recent testimonial to this being more than basketball. I've chosen a few. You can have the rest. Please read those. They are very, very, very special. Written from a second grade perspective on a writing prompt about the Lady Raiders. Here are a few with pictures. Dear friends, I think you girls are the best ever. Congratulations on your hard work. Love, Ivy, PS. I'd better practice my basketball. Dear NHS Girls Beatball team, you must be very brave to play in the tournament. I'd be really scared to play in the tournament. You made Sheboygan look good. I love playing B-ball. I played B-ball for the rec department. Our team is the gold boulders, sincerely Cameron. Again, the envelope is full of more. Here's the last one. Dear NHS Girls Basketball team, my name is Tracy. Congratulations. You worked very hard to play basketball. I think you guys are very, very nice. And you are so sweet to people. Do you always like being on TV? I like watching you on TV. Love, Tracy.  Thank you for all you did for all of us. Congratulations. Next we have our school board president, Mr. Jeff Squire. Thank you, Dan. Thank you for giving me the chance to speak today. And before I go any farther, I'd like to say congratulations to Susie and to all the girls in the team. You made our community proud. And as a school board member or president, I represent the whole community. And I'll tell you, I live on the south side. I'm not a South graduate. But I had parents from all over this community come to me and say how proud they were, whether they're from the north side or the south side, of the girls and the coach and our students and how they represented themselves at Madison. It was truly an honor. So I just wanted to relay that to you that your community, not only north high, but south high, I think the whole area is really proud of what you did. About 40 years ago, there was another famous coach who said, if you want to be the best that you can be, if you want to be number one, you've got to pay the price. Winning isn't a summertime thing. Winning isn't something you do once in a while. It's a habit that you form. I know from talking to community people, from the teachers and staff, that Susie, all the girls that are on the team, spent many hours during the season off season working and practicing to make sure that they were as good as they could be. And it's more than just a basketball game. When you look at it and you say, oh, they went down and they played a basketball game, I didn't get to Madison, but I have three young kids and all three of them stayed up the night of the championship game and they're only six, eight and 10. They're usually in bed between eight and eight 30. All of them were awake, wide awake until the very end. It was 10, 10, 30 at night and they would not leave. They were inspired by all the action by the things that this team did. It's impressive and you say, oh, it's just a game. It really is so much more than that. My son for the last week has been playing basketball now that it's warm out in our front yard. You don't realize it, but what you have done is set an example that the rest of this community, the rest of our schools, will look to and follow in the future. And we're proud of you and I'm proud to say that I'm here in Sheboygan and then a part of Sheboygan area school district. You represented us well and you inspired us all. I wish you the best of luck in the future and I look forward to coming back to North in future years to do the same thing over. Thank you and congratulations. Next on our agenda is the superintendent of schools, Dr. Joe Sheahan. Good afternoon, North High School. Well, why are we here today? Your champion, Lady Raiders. As I go further today, I'm gonna talk about different team members, as far as team members in the stands, but as a part of Sheboygan area school district, just want to thank what these ladies and coach has brought back to Sheboygan. And going through all those games, the dedication, commitment that went through to get them there is truly impressive. What they've spent hours with, years after years, and dedication, knowing that theme was unfinished business, well, coach and ladies, you did it. You made it to state and you brought it back. Congratulations. Now, as again, when we talk with different community members in Sheboygan, I do really want to touch base with some others and next group is parents. Parents of the players, could you please just stand for a second, those of you that are here. Please. Thank you. Now, that commitment to them, you know that means sometimes young ladies getting you to practices, sometimes when you weren't the most excited, and I'm talking years ago, from taking you to different places and getting you the different types of shoes in that you may need it, the different fundraisers that they did and all that support for you throughout the years. Parents, thank you very much. And most importantly, the heart and soul that you gave your daughters were shown on the court and off the court. And that didn't start at North Hyatt, it started in your houses, so thank you. Next group is staff members. The staff members at North Hyatt, thank you very much for all the things you've done with the young ladies throughout the years. And I saw it at the games and it's during the halls, it's just all your commitment to being there and even those gentlemen with those crazy more cowbell stuff. There's just different examples of support for you, the North Hyatt Raiders, so thank you staff. And lastly, student body. The student body of North Hyatt, ladies, you are dedicated, your commitment and you are quality, but so are you North Hyatt, the whole North High student body.  When I was walking back and forth, getting popcorn, the comments made to me like, wow, those kids have class. Coach, lady Raiders, you have class.  All of Sheboygan, we will win that sportsmanship award for the state, for our behavior and our great attitude as fans. You are class. And just finally to conclude, please don't think that your impressions have stayed just at North High School and I know people have been talking to you in the community. When I go around the community, I'm getting the way to go, congratulations. And I'm saying they did it. So your impressions are not just in this house and in this school, they're in our whole community. Sheboygan is proud of you, of who you are and what you're about. And again, thank you and congratulations. Our final speaker before we get to the coach in the team is the mayor of Sheboygan, Juan Perez. Good afternoon, everyone. Coach Runas, lady Raiders, congratulations. And thank you so much for making us very proud. The victory that they have brought to the city of Sheboygan is a victory for them personally, for the coach, for this wonderful school, North High School, and the whole city of Sheboygan. You've made a lot of people proud with your accomplishment, your talent, and your skills, and your teamwork.  Please keep up the good work and I wish you the most success in your future endeavors. Thank you again. Okay, now we'll have some comments from the captains of the lady Raiders. To thank our coaches for a wonderful job that they did this year, they pushed us all through practice, practiced with us, and there's no possible way we could have gotten here without them. Thank you. Okay, we just want to thank, especially, the band for coming with us all three days down in Madison, Mr. Forks. Hi. We also want to thank the drumline, that was amazing, and the dance team, that was sweet that they came on everything too. So thank you. I also like to thank all the people here at school that had made everything possible, Mr. Dan Stangle, especially for all the work that he put in to get us down to Madison, and also the gym teachers, Mr. Thompson and Mr. Brickson, Coach Brickson, for allowing us to come in the mornings during the summer and always encouraging us and treating us like equals that really has helped us out and especially with the training and helped us become stronger and we really appreciate that. So thank you. We'd also like to thank our wonderful cheerleaders for doing an awesome job. Let's give them a round of applause. You guys are behind us the whole time, as well as our awesome student section who haven't just been there for basketball, but all the other sports too. They've done a great job and stayed positive. Our parents for always being there and just the entire community for staying behind us. We had a great time at State. So thank you for all your support. Now we have the Lady Raiders Coach, Suzy Runas. It's actually Coach Runas, not Runas. I was nervous. Thank you, Dana. Well, I think the girls have pretty much covered my thank yous and it's been such a whirlwind week that I had to jot some things down because sleep has definitely been overrated this last week but it's been quite the journey, quite the ride and needless to say, you couldn't see all the behind the scenes activities going on down in Madison, but I tell you this, we had one great time down in Madison and that's all part of the experience and all part of the journey and when it was time to play ball, the girls were ready but when it was time to let loose afterwards and have fun, we did that as well because that again, that's all part of it. Like the girls mentioned, there's so many people to thank and there's so many people involved in order for this achievement to be achieved. So again, Mr. Stengel and the administrative team, we were here first thing last Sunday morning making the plans for this trip and unlike last year, it was much more organized and much more easier to get through so thanks Mr. Stengel and everyone else, Mr. Laresh, everyone that helped out with making the arrangements. To all of you people in the stands and all the people that are home and whatnot, thank you for traveling to all of our games, not just this final stretch but to all the regular season games, tournament games, those who watched us on TV, those who listened to us on the radio that weren't able to get out and watch us personally. Just thank you for supporting the girls this whole entire season and especially down this final journey down to Madison. We had a lot of local businesses that sponsored us throughout the year and a few that actually kept us fed nicely over our trip to Madison. We wanna thank you for supporting us in our game brochure and supporting us to and from Madison. The student body we talked about, I can't thank you enough for your support, drum line, cheer, dance, everybody. The girls and I also, we wanna thank Coach Desatelle and the boys team.  And there's not enough thank yous in the world but I wanna personally thank our Lady Raider parents. You guys are the best and I thank you so much for everything, sounding boards to phone calls to running to get us food to just every single little thing. There's too many to mention but every single thing that you guys do for us. So parents, you're the best and thank you for everything. It takes a lot of work, a lot of background work and a lot of hands-on work and I could not have done it alone so I'd like to thank Coach Hutz, Coach Tago, Coach Forsterling, Coach Wigdahl and our best athletic trainer in the whole state of Wisconsin, Chris Lenz. And last but certainly not least, I wanna thank my team. You guys just thanks for a great journey. As a coach, I am so proud of each and every one of you and like I said in the locker room, which you guys don't know but my girls know, in the locker room after our game on Saturday night, I told those girls that I didn't need a color of a basketball trophy to know that these girls are champions both on and off the court and they played their hearts out. They left it on the court and as a coach I could not ask for anything more. So ladies, thank you for everything and for you seniors, I wish you nothing but the best. And as Dana and I would always communicate to each other but I communicate to the whole team, you guys rock, so nice job girls. Like I mentioned, we had an outstanding season, an amazing tournament and we definitely saved our best basketball for the end. Their play down in Madison was second to none and again, I've had so many comments from the public and community places I've gone to in the last few days just making that very same statement about how well these girls played, what a class act they are and just amazing to watch the girls playing and just cheering so much for them wanting them to win it but again, we have nothing to hang our heads about these girls played their hearts out the whole time we were down there. I'm so proud of my team for their efforts both on and off the court and as a coach again, I wouldn't ask for a more dedicated, caring, hardworking group of young ladies and girls, you should be proud of your accomplishments, be proud to call yourselves a lady raider and again, I wanna thank Sheboygan North, I wanna thank the whole entire community and we'll see you next year.


I'm dreaming tonight of a place I love, even more than I usually do. And all this year is Christmas Eve.


What's going on everybody got Kyle here with ladies sports cars from my two boxes for Jonathan L. Got a 2023 Bowman Chrome Breakers Delight and a 2023 certified. Good luck here Mr. Jonathan. We'll start with the Bowman Chrome U. Of course Jordan Travis, early risers. Again Jordan Travis. We got a Refractor Blake Corum, Tyreek Chapel, Jayden Dolora, Joseph Griffin, first Michael Hall Jr. and there's Travis Hunter on the shock. Shock first. Got a Purple, that one's going to be a 399 Emmett Morehead, first out of Boston College. Got a Joe Alt to 150, Purple on the Minidiamond or Future Minidiamond to 150. Joe Alt. We've got Jalen McMillan on the Aqua, that one's a 299. Nice one there for Washington. A good receiver. Second best receiver behind and Rome. Got a Base Auto, this one's going to be Dallas Turner. Dallas Turner for Bama. Very good linebacker for them. Nice one there on the base. Will be in the NFL soon and on the back to 75 we got a Will Howard. First Auto there, that is the QB for Kansas State. First Auto to 75 and now for some certified. Good luck Jonathan. Alrighty again guys we do have Forrest coming in a little bit later. He'll start in about an hour from now. He will get group breaks going. I think we're going to be full after this one. I think we'll just end it here after this one. Appreciate everybody hanging out with me and showing. And again Forrest starts at five. He'll have some more personals if you guys do want to get some done later tonight I think. Yeah check out Sunday Funday. He's got soccer, baseball and basketball group breaks all for tonight. Then he'll end with the 25 box Sunday Funday. There's a certified star. He's going to be Diamond Cook. Got a new generation on Jersey 199. Going to be Sean Clifford. Packers on the Jersey to 199. Josh Allen. They don't look very happy. Yeah, no, it's got to be tough playing for a team of states. In 149 we got a certified stars Bijan on the orange. Nice one there. One of 149. Nice little Bijan for the Falcons. That mean the Chargers about to win. The Chargers say franchise foundations will Anderson Jr. We've got Cameron Latu, rookie for the Niners to 399. Latu, sauce. We get the backup in. There's a Rothesberger Immortals. And nice Jameer Gibbs on the Aqua. That's a nice little color match there. 250. Very nice rookie for the Lions. Oh, they're into England territory. Gotcha. Come on, then Chargers. What's the score? You've got them four and a half. I haven't seen anything. We got just the Dolphins game on so I don't know. Calling cards of base. Joe Burrow. Patrick Mahomes. That one is the 349. Little Patty. Little Patty. Got the cheese versus cheese tonight or tomorrow. One of the two. Certified stars Saquon. Forest will start at five. What's up, Omer? Yeah, Forest will start at five. He's got group breaks going on later. Five o'clock will be, he's starting with Find a Soccer. Then he gets into some baseball and then basketball and football. Forest and Jaker will be here starting at five. There's a Tank Bigsby. That's going to be Bronze RPA to 349. Freshman of Fabric RPA. Omer, there's the link for the break schedule right there. 6-0? Oh, no. That's crazy. Max Crosby. Yeah, I've not been watching Patriots games the last few weeks. They are. It's in hour and 15 minutes, Omer. Hour and 15 minutes. It is 345 right now. Certified stars, AJ Brown. And this one is Devon White. Devon White to 75. Go Bucks. Fire the cannons. Fire the cannons. Mirror signatures there. Devon White. Best linebackers in the game. Justin Jefferson. Yeah, appreciate you, Omer. Gotcha, sir. I think the break schedule does adjust to your time zone. So if you do look at the break schedule, we put in a link right above. It does adjust to your time zone, so you're able to see what time. There's an immortal, Steve Young. Got Bronze, Felix, Uzama to 275. Rookie for the Chiefs. Last two packs, Jonathan. And this will be the last of the daytime here, guys. I appreciate everybody helping us fill up, keeping us busy today. Get out of Forest Way, and he'll be starting here soon. There's a Bronze Josh out to 275. Jash. Kirby, Damien Pierce. Yeah, that's pretty bad that I can't score more than six on the Patriots when they're not trying to score. That's pretty bad. Yeah, that did. Nick Bosa Gold team. And New Generation Jersey is Devon Achan. Especially when you have Kirby as your quarterback. For the Fintz. You should be just carving people. Yeah, for sure. I know. Alrighty there, Mr. Jonathan. That'll do it. That'll do it for your two boxes. Appreciate you as always, Mr. Jonathan. We'll get those right out to you, sir. Thank you. Thank you.


So, my first touch will be actually right in the script, so that's what we are here all together. So my first script will be, let it be the Hello Bash, but before we go actually for writing the script, we have to decide, or you have to decide which editor you will use to write your scripts. So you have number of options over here. There is a very popular, like Emacs, if you are familiar with the Emacs, go with it. There is a very popular, another one, EIM, it's also the text editor, which is used by many people on Linux, but both of them and Emacs, let me put it this way, so it's the Emacs and VIM, they are quite complicated and they require some kind of fashion and experience. So when you are becoming the experienced users of Linux Shell, you will definitely, you will pick up one of them, or less experienced people, we suggest Nano. Let me run it and let me show how it works. I would suggest if you are not really experienced with any kind of text editor on the Linux Shell, then use that one, it will be the most intuitive, I would say.  And for instance, I want to save it to the Hello Bash, okay, and I'm now in my demo space, and I've got this Hello Bash dot shell. So that's the first script I have created. It's not really a script, I have demonstrated how to use Nano. It's up to you, which one do you prefer. I prefer VIM, and during this course I will use mostly VIM simply because it has really good highlightings, it has, and I'm just way more experienced with this one. So let's try to, I will delete this line, and then let's try to write your first script. Your first script ever will come with this cryptic line. It stands for, it's called the SheBank. SheBank is nothing else than the, it says to the program which runs, which interpreter is supposed to be used. So VIM Bash is path to the binary which will run the code which comes after. And so, and this number sign and exclamation mark is a special, two special characters which are widely used in Linux, especially for the, which are used in Linux for the SheBank mark. So in the same way, when you'll be writing some Python script, you will be putting this SheBank with the USRB in Python. If you will be writing some TCL or some other, something which is just normal text. So that will come into use as well. In the next, let's actually output something, which is the Hello Bash, let it be even correct way. So now I'm done. I'm also able to put here some comment. So let me say that it prints Hello Bash. That's that much you're supposed to know. So then another one about syntax. So this is the comment. This is the SheBank. That's the comment which comes and which outputs the Hello Bash. And then you can continue the stream, for instance, to another line. So just put the backslash like this one. If the line is pretty long and you want to make it more or less compact and readable, you can use it. We don't need it right now, but just this part of the syntax.  But in case of Bash, it doesn't really matter. So you can put another one comment over here like this. Hello Bash again. Okay, it typings. Hello Bash again. And that will be completely okay. You can do it even more compact. You can do it with the delimiter. It will be also okay. You can do it this way. It will be also okay from the Bash syntax point of view. So Bash will not tell you anything about your syntax, about all these lines. So the empty lines, that will not be, that will be just omitted as usually. And this is pretty much everything else. This is pretty much it that you should supposed to know about the syntax. So we will come later to the blocks, we will come later to the if statements and these for loops, et cetera, and the other stuff. And you will see that the actually I will use indentation over there, but it's only for the sake of readability. So let's try to run the script. If I do it like this, first comment not found. Okay, so what happens over here? You can see that actually from the Linux perspective, you can check out what kind of permissions the script has. So even if it's the already something with the .shell, actually, the .shell is nothing else than just the extension. So extension can be any Bash script is not supposed to use .shell. I'm just using .shell because I want to make sure I want to make sure for myself that I know that that's the shell script and it's written by myself. So but only because it's text, it's supposed to be executable. This execution beat over here, it's missing. So they should be X. You remember from the previous course, they should be it's readable, it's writable, but it's not executable. So what first I need to do is I need to change mode and say that my script is going to be executable. Hello, Bash class X. So now you see I've got this plus X. Fine, it's already executable.  Why? It's because the Bash is actually to not pick up your local files by default. So it expects that your binaries, even including the script, they're somewhere in the directory. So you have to call them explicitly and call an explicitly saying that I need to put the path. In my case, it's just enough if I put dot and the slash. That means that in current directory, take the hello Bash and execute this. So now it has happened. Well, this is our first step. And now what's next? Next, I would like to use the good practice and create a directory where I will be putting all my stuff and not only will be keeping all my stuff in there, I will also make it this way that Bash will actually look at my directory when I want to execute something and the script will be executed without this dot slash. So how to do that? I suggest that you run makedir in your directory where you are bin. We will come to this during the exercise. So I have already been directory, but when you will need to run it just like this. So I have already been directory. I have even a couple of scripts over there, which we will be later use. No, just one. But then let me move that Bash. No, hello Bash only. Hello Bash over here. So now I have it in bin and it's not yet enough. So what next I need to do? I need to modify the environment variable called path. So if you look at the echo path, there should be some directories where your Bash will be looking at to find the binary that you are trying to run. So even the Bash itself, it's somewhere in the directory. So in our case, it's bin Bash. Yeah. But you see that this bin Bash has been already added by default. So it's already part of the default. So it's Bash user, bin Bash, et cetera. So it's part of the default and it's always there. But our local bin has never been added to the path. Path is modifiable. So you can edit this and let me do it this way. So I can use the command export. So now don't go deeply into this. Just type, you will just use it as is when we will be doing the exercise. Export and I will say that export my path and do the changes. So add to my path something which is called demo space, bin. What will happen after? Let's see. If I take a look at the Bash at the path once again, you will see that actually my directory where I have my scripts has been added to that path. And now it's executable. Now if I run something like hello Bash, it will immediately be executed as next. And I can tell you even more. This command type minus a, this is the utility within the Linux, which can always ready to tell you which binary will be run when you type with no absolute path. So in this case, it tells me exactly that hello Bash is like this. Okay. Then what else I was about to tell you? So the execution summary, a kind of executive summary is that you create the file. You make sure that she bank is there. Then you don't really care much about syntax. That's a takeaway message. Then if case, that should be enough already to get your running. But then in case if you want to be efficient and productive, so you will organize your own bin directory and you will add it and expert plates it to the path variable. So that information should be pretty much enough to go for the exercise. To go for the exercise, let it be first exercise because you are still will be playing with the editor. So let us say that it's going to be 10 minutes. Yeah. And now it's 1222 so that we will go till where was the exercise down. We will go first exercise till 32 of your local time. So I put here xx because I expected some people are not from Finland. So some people are from some Wales. So it's not, no, sorry, the vice-versa 30 or let it be three. So now it's your time. You try it. You may succeed. You may not. Not a big trouble. Just ask your question online. And when you're done, please put something like this over here. Or if you see that it's come, the time is coming. So press it over here like this. Or if you still don't really care, you're just listening. Write it over here. OK, so not 10 minutes is yours. And let's go. I'll mute myself for a second. Continue. Can you hear me? Hopefully, yes. I mean, if you can't hear me, then just tell me. OK, so the first exercise has been already done, has been already over. So your hands are already dirty, which is good for me and good for you. So welcome to the world of the bash. Even though that some of you have already written some scripts. Actually, I want to, even if this hello world is not so practical, but let me write another script. Let me go back to the prompt. So if you are a Python user, for instance, then you may think, OK, I'm writing Python. And I have a kind of sandbox where you can test it easily with just writing the command. And then, for instance, you do something like that. And you're just quite. Yeah, that's fairly easy. And you can think about how to do that with the bash. Well, you're already actually there. So this command line that you have, it is already the kind of ready to go prompt for you. You don't need to put bash. You don't need to put anything else. You just put your comments and everything what you want you can put over here. So in this way, bash is adapted for the interactive usage. So scripting is just the kind of fancy addition and the kind of value added to the bash. But bash itself is mostly about prompt. And most of the comments you can run as is just from the prompt. And this is what we will use over here. So some of the statements, some of the expressions I will just test it from the command line before actually adding them to the script. So scripts are made mostly for a sake of automation. Scripts are made mostly for a sake of if you have a long list of comments, you don't remember all these parameters, and you want to make out of this complex construct of some utilities. You want to make out of them some kind of one single comment. So this is what for you are using the scripts again. And see that, for instance, one example that I will show you, so for instance, I will be doing this archive in time of my demo space and saying that I want to compress it. And my file name, which I want to my archive name, will be like demo space targ.gizet. So it's the quite common in Linux, tar utility and the gz compression. And then I am saying that actually my directory, which I want to compress, that's the demo space. So I can just put one single dot. But for a sake of readability, let me put this way demo space. So I'm doing the compression. So these are warnings that you can skip them. So now you see that I have got the file over here. I'm not exactly kind of, I'm not exactly, it's my colleague over here. So I'm not exactly, maybe wants to do it time to time. So what I want to make over here, that I want to put it to the bin and make it one single command, shorter one and easier to one, and which will serve us for the whole course. So we will do the modification to that. So let me call it tar me, for instance. My shell script will be starting once again with the bin bash with the shebang. And then I'm putting here my comment over here. And as a good practice, remember to have some kind of comments and some kind of revision history. So what you've done and when you have done. So I'm saying yet nothing about the git over here. But I encourage you in your entire life after all, use git for a kind of versioning. Here we just skip this part and make it kind of more simple. And the git part will be covered already by the code refiner when you will be there. So but here I archive my directory. So that's the easy way. And then let's try once again, change mod plus x. And what's good about this, because if you put tarme.shell, you will see that actually it's immediately found from my bin directory, because my bin directory has been already added to the path. And I don't need to do anything else if I decide to go and make another archive. I just run tarme. And that's it. We will use this further to develop a bigger script. So this will be part of our exercises. It will be part of our demonstrations overall. So this is why I did this right over here. Sorry. Variables. So definitely what you want to know about when you start programming something, how to use the variables within your code. So the variables is nothing really specific. So let me start doing this in the prompt. And then we will move these variables to the file. So variables, it can be any. It can be just the letters and digits. And then minus, that could be hashed. So there is quite a number of the. There is some special characters if you go to the variables section of this material. So you will see there were somewhere a list of special characters. Yeah, sure, it's here. It's coordinate substitution. So these characters cannot be really used in the variables because they are part of the other syntax. But then everything else can be used as a variable. And so let's see what else. So variables, for instance, are signed in the variables. We just put the equal sign and say my first bash variable. It will be like this. It's already there. So in order to call that variable, it's enough if you put the dollar sign in the front of the name. And so you can see Echo will give you the output of that variable. In the same way, you can use this dollar sign variable name within any commands or within any part of your script. It's just will be calling. And it will be returning you the value of that variable. Variable, there is no kind of definition. There is no points. There is no strings, Booleans, integers, et cetera. So all the variables inside of the bash they will be used as is. If you are doing this as a string, they will be interpreted as a string. If you are doing it as something else, if you make an integer summation within the integer expression standard, it will be interpreted as an integer, et cetera. So bash is really flexible in terms of variables. So even if you are not defined it, but you still call it, it will just return you the empty variable and not the error. So be careful about this. This is actually quite common errors that you are misprinting or mistyping the variable and you call it later and then you are surprised that, OK, nothing comes out. Actually, bash doesn't really take care about it. It relies on you. And it still thinks that you are making your scripts pretty much robust in checking whether the variable is empty or does it exist at all. So here it comes, the place where the quotation also matters. Let me open once again the low script and I will use it as a sandbox for this kind of situation. So for instance, I want to assign a variable and let it be some text. And then if I go to the echo and want to output that variable, that should be enough. But then if my syntax or if my sentence is more or less complex, so if I want to say that var is, OK, I have to use already, well, not exactly. I have to use with the echo, but let's assume that we have to also use the echo. So I have to use the quotations. And here comes the difference between the quotes. So the echo with the single quotes will produce you exactly the sentence you have within the single quotes. It will not open for you the variables. But the double quote quotation will do it for you. So here, taking out quotation matters. So then there are a few other things. For instance, less complicated cases. So let's try it out. So now we will actually, we can use it. We can comment this once, just we don't need it. And use it as a sandbox. So it has been already added to the bin. It's executable by default. And now you can see the difference. The first line has been using the single quotes and the second line was using the double quotes. So yes, take it into account.  You will be surprised if you type this print and you will see a long list of all kind of predefined variables. Some of them read only, some of them are changeable, but most of them you don't really need to touch. Except with something which is kind of, I don't know, well, I don't know even the exact example when you need to change the variables. Well, sometimes you end up changing this, for instance. I've been doing this for the script, which is over here. But anyway, so and a few examples that you may find useful. The first one was already mentioned. That's the path that gives you the list of the directories where a bash will be looking for the binaries when you type it without the absolute path. Then home. It's exactly your home directory. Then, for instance, shell. That's exactly your bash shell, which is defined for you. So I said nothing about the other shells, but that's probably the good point to do that. So bash is just one of the shells. We were talking about this, about this on the first part of the course. And there are other ones, which are perfectly fine to use as a shell or something else, like current shell. It's up to you. But this course is focused on the bash, mainly because bash is the most popular nowadays. And this is also the shell number one for us, because we are running the big cluster installation Triton and so on. Triton, we expect everyone used to bash. So this is one. And because I'm part of the team, so we pushing people to use bash and the whole course is about bash. How to change your shell? It's the change shell command. If you want to do it on your local desktop, it's easy to do. You do the change shell, and you just put the bin bash and your next session will be started with the bin bash. OK. Said that, I think we can now jump to the exercise number two. So I call it variables. And I will give you another 10 minutes to do what first you need to adapt your hello bash shell and assign the hello bash to a variable and print the variable to the output. So I've done it already for you during the demo. So now try to use your memory. Don't look yet at my hello bash, but try to use your memory and try it out. Then the next one, which haven't been done yet, but now you have to implement it on your own. So your script, which will be placed also in the bin and call it whatever you want. I call it here print vars, which will print for us the home shell and path one per line. So now time is yours, and we are 48. So let's say that already 49. So let's go this way. We will have both and the how to call it break. Let's call it joint break and exercise sessions. So we will come back to the screen at 13.09. So 10 minutes for the break, 10 minutes for the exercise, and you decide how you use in which order. I mute myself, and I will add it to the material. So my next stop was actually tell you even more about the variables. This is something which is very specific to the bash. This is what you probably will not see in most of the languages. So when you can do something with the variables on the fly, the constructions looks like this circular brackets column, and then some kind of cryptic syntax which will do something to the variable as a string. So what can be done with the string? So you can make it, for instance, all capital, all small. You can replace some part of the variable value. Then you can, for instance, check whether this variable exists or not. You can redesign it, redefine it with some default value. So there are quite a number of things that you can be done. So I'm not really put everything to this material, but the selectives of them are over here. So you can check them out. And then on top of that, you can also actually forgot to say. So if you're ever thinking about syntax, if you're ever thinking about some particular commands which have been used within this bash scripting, so all the internal logic is written in the bash manual. If you go to the for-demand bash, you will see the very long, I mean, it's at least 100 pages if you will print it out in your normal font size. But you will see all the details about what else and what kind of options, what kind of arguments are given by every single command which I use in general. And then what all these magics, all these extensions, all these practical aspects of the bash programming. So the magic I was thinking about is that, for instance, I know that the echo var already exists because I have it designed. Actually, let me tell you one thing. You can unset the variable. So if you don't really want this variable to exist anymore, it will exist there as long as your session is there. But if you don't want to exist it anymore, you just can do it with the unset var. And now if you see that I am trying to address var, it doesn't exist anymore. Bash is not complaining anything about calling the undefined variable, but it's just returning the empty line, which is fine, which is not an error. That's just a feature. So let me say that I want to define it somehow. And for instance, it's still undefined, but I want to check it out. So my approach would be here, checking out, for instance, this one is pretty simple for the sake of checking out the existence of this variable. So you see what will happen. So echo or bash on behind of echo, it will check that variable exists or not, and then give this error message which comes after the question mark. So here I'm saying that bash var not defined. So if you use it within the script or within your function, it's perfectly enough to make your script more or less robust. There is another one option. If you set up an exclamation mark, you put something like equal. That would check that variable. And if it does not exist, it will assign some special value, some default value. It could be anything. Then just put default value.  But then if you see from now on echo var, even if it has been undefined over here, you see you remember that. Now it's already has the value. And the thing to remember, with all these major constructions, with all these curly brackets, this column and the equal sign is the only operator which actually does something to the variable. It changes it. It assigns the default value or another value which you just put it over here. All the rest, all the rest which are listed here as the selected operators, they do really nothing to the variable. They just simply extract it, or they modify it on the fly and put it to the line, to the online, give it to the output, print it to the output. But then they actually do nothing with the variable itself. So a variable stays as is. So let me do the example, for instance. Here, I'm grabbing the F path. So I'm saying that that's my path to the file. And I'm naming that variable accordingly. So if you take a look at the F path, it's pretty much like that. So what I want to say that I want to first get the path, for instance. Here, this cryptic says that, OK, return me everything. What is before the last slash? So actually, everything except what is after the last slash. So now I'm getting the name of the file, actually. So you see that I've got rid of this one while the file itself, I mean the F path, has not been modified. It's only the modification which has happened on the fly and it has been outputted to the script. In order to make it modified, actually, you have to reassign it to another variable. So if I assign it to another variable and say let's call it F path 2, now it's going to be already something which will be remembered, which will be saved to the memory and which will be part of your global space. So you see. And then, for instance, another example. If I want to keep running this F path thing and want to return only the path, so that's the another approach. So I'm not going any more deeply into this. I want you actually to go this deeper into this thing. So learn this section and let's try it. Let's say that we go for another 10 minutes playing with this variable magics. So what I want you to try, I wanted to try in this construct where you have the variable name and then the curly brackets and then something after the variable name. Lead on your own or actually if you will be ready, here is my, oh, did I put it over here already? So here is my suggestion for you. So you pick up once again your hello-bush and you change it in such a way that this variable hello-bush will be printed in capitals. That's the first. And the second one is that you will wrap once again that F path variable in the way you want to, but I mean you just copy paste from the course material and make your script to return file name only without the full path and extension. So the hint over here is that I've said you previously over here is that you will not be able to do it with one single iteration. You will have to do it with two iterations. And for that you will have to save one variable to another. So let's see how you will manage this to do. You will have now 10, maybe even 15 minutes because it's gonna be quite a challenge for you especially for the first time, but then let's go. So we will finish when at 13, 25, okay, we're gonna keep going. So let me demonstrate you with your techniques over here. So the first, I will also put it to the answers to this both exercises, to both task of this exercise will be on the notes, but then first let me go with demo. So quick demo for the first one, echo. And then we were expecting some modifications to the bar. So we need the curly brackets. And then we need to say what we want. So we put two hats over here. That should be enough. Let's see what we get out of this. So yeah, so you can see that actually the first one was from the previous version of the script and the second one was already the first, they said the other one. So regarding the F path, playing, so there was a request to do the, get the only the archive. That was somewhat complicated and complex. And I do hope that that place, some of you have got already some of this. So let me grab this one and say that I go to the bin and I will create my new script.  And I will play with that. And I will say that it's gonna be bash once again. And let's see what can be done. So I actually can use pretty much the variables, modifications, this magic from the learning materials. So, but here what I'm getting, I would get it only on the fly. I don't really want it on the fly. I want it to be another variable. But here I don't really care about the original F path. I can simply reassign it in order to make the modification, not on the fly, but save them to the variable. I can simply assign it this way. And you will see later that actually, so let's say that I wanna put the F path. And I can say here that's the phase one. It's gonna be the F path part, which will be, I will take off everything, which is behind this one, this slash. So the only thing which will be left to me, that's this one. Okay, and now that's the moment where I can already, if I don't care about what's the final result of the F path, this is where the moment where I can put something like this, but modify it a little bit. So let's say that here I put the comments, just to simply here, we get archive with extensions. Okay, you can check it out from the command line. I know that it's gonna be like this already because I already checked. So I just put it to my script already directly. So now, so this block is over here. Now the next step, get archive out of. So now we have to get rid of this too. So how to do that is that we can say that, okay, we don't need dots and we don't need anything out of these dots. Now the trick thing, because of this syntax, so this will allow me to get rid of the only the last one content of which comes after the dot. But what I want, I want everything after the dot. So in this case, I will have to use the true percentage. So that was the complication over here and that was kind of thing that you had to find it out from the manual page or just to try to fade with that. Okay, now let's see what's going on. Change mode, let it be, okay, okay, it should be plus X. And now I'm ready to run F path. And so in the phase one, we've got archive target. And after the second one, we're going to archive. So take a look once again. It's nowadays looking like this. So let me put it to the solution part where my 15 minutes functions, that's gonna be the next one, here is the, so here's for everyone who wants to take a look at this later on. Okay, now we can, if any question, please ask, if something is yet unclear. So I can take a read of this one and we just have actual the part which is, which we need. So saying that, I think I'm done with the variables and you know already pretty much a lot. So you know already how to use the variables, you know how to find them, how to call them. You should now by now know that the variable can be undefined. And then you also know this magics of this bash variables which you can do with the curly brackets and do some modifications on the fly in case you want to do this. So if you want to substitute this modified variable and put it to the command line, so that's the way to do with the curly brackets. So now the next one I wanted to try is functions. Functions, as everywhere, it's just piece of code which you can use repeatedly. Usually, I mean, if you know that within the same codes you can, you will use the same piece of the same snippets so you can just put them somewhere else to the function and then use them all the time within the code. This is quite normal, this is quite usually and this is not an exclusion in terms of bash. Functions are there, the only difference, the functionality of the functions is nothing really extraordinary. It's just piece of the code which will work in the normally global space. So basically you will have access to all the variables that you use within the script. You will have access to all the variables, the global space that would mean that you have access to all the variables that you have assigned it within the script itself. And then on top of that, every single modification of that variable that you do within the function will be seen to the end of the script. So just remember this. And this differs this functions functionality from the other languages. On top of that function does not really return result of the modification of this variable with the return command. It does have the return command, but return command does nothing except returning the exit code. The exit code, this is something which is, I already mentioned it once. And so every time, every time when you run some command for instance, if I run something like echo test, you can expect that this command has returned some exit code. The exit code is saved in the variable called dollar sign and then the question mark. Okay. And in case of bash, if it's zero, that means that the action has succeeded. And if it's non-zero, one, two, three, any other digit. So it means that the action actually has failed. So this thing to remember and to take a note if you are doing so. And let me get back to the functions. What I suggest to do is that I suggest to organize the file which I would call functions. Surprise, surprise. You don't need to put .shell or anything like this. It can be just functions. Another one, surprise that within these functions, those, the file where you want to define it, you don't really need to put the .shell back. I will tell you, I will show you how to call the functions later on. But just for now, it's enough if you just do it without it. So my first example will be for you. Is the usage of your space? So let me first get out of this and copy paste the command from the material. You can do it on the same way. So what the command does, it shows you the files in this current directory and sort them out by the size. So in my situation, I'm trying to look at the all the files, including the hidden ones. So the hidden ones, as you remember from the previous course material, that's the one which start with the dot. So by default, if you don't address them specifically, no one of the commands, neither LS, nor other commands will see them. So this is why they're called hidden even if they are not really hidden in such a way so. But you must say explicitly, and this is the expression how to address all the hidden files in the current directory. So because no one of the hidden files is found, this usage gives me the warning that nothing can be accessed. It's completely okay, it can be ignored. But the other files are over here. So I have tested this command and now I want to make a space usage out of this one. So let me write the function. Or did I have a functions? Okay, I probably haven't functions. I haven't, yeah, that was empty. So now let me go into that function and put the body of my function and then put the actually name, et cetera around. So the way you write the function, you'll open the curly brackets. So you put the name of the function. It should have this brackets, round brackets, and then you put the curly brackets and then you put actually the name of the command itself. So now it has been defined. Now it's in the file. And the function file does not need even the execution bit. So if you look at the LS minus L functions, you will see that it's nothing else than just normal text file. How to source it? So you can go to, you can just crop that file functions and type source. And you will have this functions part of your environment. How to check it? Again, you can use type minus A and see that what kind of function is behind the space usage. And you will get the list. So there are two signs here. First, space usage is part of your environment by now. And second sign, that the space usage is the second sign that you can see that's actually, it's supposed to work right away. So by now, because it's your part of your environment, you can run it pretty much like any other binary. So now you can see that after running space usage, there will be this kind of list exactly that I would have get out of this command. But this command is now has a kind of unique name, space usage. The name you come with, it's just up to you and actually Bash doesn't really care except that you are, if you are not trying to rename some real, some real binaries. And even for that, there is medicine. I don't tell you yet anything about this, but for this there is medicine as well. So let me say that I'm pretty happy with this already one, but there is something else that can be used with the functions. Functions can accept the input parameters and input parameters. So if let me say that if I call space usage like this and then if I say some arguments, number one, arguments, number two, arguments, number three and so on, they will immediately be within my function, they will be immediately recognize us dollar one, dollar, where's dollar, dollar two, dollar three, et cetera. And we can use it. Okay, so let's say that we expecting some input arguments, input parameters, and let's say that my space function will be actually expecting a directory so that I don't really go and check the current one, but I can check anyone. Now what to do? Now I know that my directory is going to be like this. Yeah? And so what kind of thing I can implement over here? So I can say that everything within this directory like this or even more, I can say that everything within this directory will be checked. It's already a good progress. So we've got already something to solve, but in case, in case, I want to make sure that actually this directory is provided, how to check it. And here where we can use our magic variables. And so we can implement it in a way that, okay, I keep it like this, but I put my curly brackets and I use this operator which will say if it's equal, if this one is not defined, then let it be my current directory. Current directory in the bash notations is dot. So in the same way, I can do it over here. If one is not defined, then I want to say that let it be dot. Now we are good enough to go with the new space usage. So now we already have created pretty robust code. Let me check it once again. Was it the minus or was it the, yeah. Okay, so here I'm doing one thing. So I don't want to reassign it, but I want to return it. So I'm using the minus operator. You see what's the difference? With the equal, I would reassign it. So I don't really want to change and I will not be able to change this special variable dollar one. But with the minus, I will be able to return the dot without changing the variable itself. That's the difference. Okay, now we are pretty much robust and now we can even put again return the space usage, the space usage, well return the space usage with disk usage command. Now let's try. Now we need to source it once again, functions. Now let's try type once again. Now you see that my script function which is now part of my environment has been modified. And now let's see how it works. First, I will use it with some variable. So I want to, for instance, check the, my demo space. Okay, let's see, it works. So once again, this one is just about the dot files. You can simply ignore this and then if I put no parameter, what it do for me. Okay, now I can see that actually it's trying to do it the same way like this. So which is pretty much what I have expected out of this function. Say it again. Now you have written the first function which can be used then within the code. So how to do that? Let's say that I want to, I will demonstrate it for a sake of demonstration over here. So now let me do the kind of dummy file. Let me copy functions to some space, whatever, space.shell. So I do it only for a sake of demonstration how to call the function within the code. So I'm now looking at the space here. I already need this shebang because I'm doing the actual scripting and snow again in the previous file, which was called functions, I was only defining the function was not executing them. In this situation, I want to define it first and execute it after. So and that's the way to space usage. And then even if I put some arguments, I can put the argument right away, space usage. And then for instance, let it be my home. Yeah, like that. Let's see what it gives us. Oh, I can do it with the more readable format so I can give it with the home. So let's see what we will get. Again, we will have to add the execution bit and then because we are already in the bin, we don't need anything else, space shell. So yeah, pretty much works. Okay, so now you've got also the idea of how to call the function within the script. And again, if you're kind of lost and you still can go to the bin and you can check it from here and see what's going on. So I don't really steal all this, these of course from you. So you have access to them. So what else I wanted to tell you about the, there are also options, how to use this space within these functions, how to use them with the local variables. We don't really wanna check it out. One thing that I wanted to introduce you, another one, beneficial part of the syntax, which is called the command substitution. So let me say that I want to define a function. I want to call this function me. Okay, so what I'm doing right here, while defining this function, I'm actually putting to the command line, not the command itself, but the outputs of this command into one single line. So command line substitution means that you actually want to substitute the output of that command into some part of the codes, into some part of the other command that you are typing. It's quite useful. You will see it's in the third examples that we will run. And now just one single to show you how it works. So I have created it. So I have it added to the functions. And now I can once again with the type minus AC that my function has been added. And if I run it, you can now see, okay, host name is not found. I didn't check it. Host name minus S change, well, whatever. So, okay, actually I know the problem over here. So it's good that we've got this error message. So what has happened just now? Again, this construction where you have the wrong brackets and the dollar sign at the very beginning, it gives you the output of the command and it just prints it to the prompt. So for instance, I want to check ID. Yeah, and I want to check ID with the, yeah, and so I'm just checking my username basically. If I do it like this, it's completely fine. It will return me the actual output of the command. But if I will try to do it like that without substitution it to the code, without substitution it to the prompt. So I'm getting the error message. Why? Because bash in the ground, it will execute this common substitution. It will put the output of the common substitution to the prompt and it will expect that it's going to be a name of the command, which is not correct. And so this is why you are getting the error. Let me fix that functions and say that actually what I'm looking for is the echo. So what I need, I need to put them all together and then output it to the screen. So let's see what will happen. I have to source it once again. Now I expect that it has been fixed. Yes, now you see that I've got the perfect information about myself, who am I? What's my group, what's my group? And then also what's my machine name? Cool. So once again, now you have at least two functions defined. You know how to do it, you know how to call it. You know how to call it function, both from the prompt and from within the script. And then on top of that, you also got some impression how to use the command line substitutions. I think we are done, but not yet fully. I still wanted to add you something with the script because I touched the command substitution. And so what I wanted to do, I have to, I wanted to demonstrate you some other commands. So let me introduce you some practical usage. Well, me function was also practical, but this is even more practical than it is. So you remember then TAR command, which I used just with the explicit, saying explicitly what's the name of the TAR archive is going to be, and then saying explicitly which exactly data I wanted to archive. So here what I'm doing in this command, let me explain that. So let me make it more readable. Here what I'm doing, I'm using the command substitution for a good. So first of all, I'm using date. Let me say that I save this command for you without executing right away. So I know what date will provide to me. This format of the date will give me a month and a day. Okay, that's what I want. Then what I want else, I want the current directory, but I want to have a current directory only the actual name one. So remember, we've done it with the variables. Now I introduce you another one way to do that. You can use the built-in utility called base name. Or maybe it's not built-in, maybe external, but anyway, it's part of the system. So now you see that I'm getting the bean. So out of this one, out of this nested command substitution, so first of all, the command substitution can be nested and Bash understands this kind of syntax. It's quite clever. So you will get bean, here you will give date and the rest will be just as normal. Okay, let's try it and let's see what will happen. That's correct. We have created some files inside the directory that we are archiving, so tar was given this warning. And now you can see that actually we've got the tar archive, which is named bean and then the date, which is dynamically perfectly generated name, which can be used for the scripts. So my suggestion that we will use it right away and actually we will go to this, well, was tar something, tarmi. And we will use it actually not as a function, but we will use it as a command. Okay, so pretty good, we're already on the functions. And I think we are ready yet for another 10 minutes exercise. So let me see, it's there, or maybe even 15 minutes, simply because it may take you 15 minutes. So now what I want you, this is the simple one, you can copy paste it as is, just create the bean functions and make sure that space is usage in me, both are there. And then on top of that, what I want you to ask is add yet another one function to that functions files and test it. So let it be called fast find function, just the FF. And what it's supposed to be, you provide with the fast find any search word, any. And it must return all the files and directories in the current folder, which name contains this word. And as I just let it be case in sensitive. So in case of find, you just put this minus I name so basically just use this one, put the search word, the what I mean, if you're not familiar with the find you still have some time to try man find or you can take a look at the course material from the previous part. So you can find some examples of find usage over here. And yeah, let's say that we get 15 minutes because this is I expected that you're back to the functions and you will read something maybe more and then you'll write your first function and make it to work. So 15 minutes, so that means that we are back to the at 14, 22. So we have left now already less than 30 minutes to go. It's almost 32. So I see that less and less people are actually in time with doing the exercises. So we will have a short also questionnaire at the end. Don't run away. We will ask how complicated was the material so on. You will actually your opinion will have an impact. So if you think that we are pretty decent for the intermediate level, your replies will only welcome if you think that it's too complicated or too intensive or et cetera, your replies even more welcome. So I will try to adapt by tomorrow the material if you decide to do so. So let's get back to the functions. So the space usage and me actually the easiest probably was just to go to this demo space which I have posted on my webpage. Copy it from there and there you would get the ready to go functions. So please do it if you haven't done yet. So, or if you were typing on your own then just consult these functions that this syntax is correct. So one question was why that was returning the error message that command does not exist. So this was explained in a way that common substitution will print to the prompt the result of the executed command. And that result will be already interpreted as a command. And so if you just put your login name on the prompt then of course there is no that comment with that name. And so basically you will get the error message that the command doesn't exist. Just a second, I close the room back online. The other one, fast found. So what I was trying to make you to do. So find function, where was it? Find name. So that should be already good enough to get started. The only thing that you need to substitute the search word. Like for instance, if I would like to be some kind of word, I don't know. Let's say that I, what kind of stuff I have here. Do we need store bin? Okay, let me find, for instance, the bash history. So now I want to I name and then I want to find something which has bashing name. That wouldn't be enough because it will be looking explicitly for something which is named bash. But we are looking for something which has bash in the name. So we need to put this stars just to make sure that actually we are looking for something which has bash. Now that should be good enough. And we found already bash history which is in the current directory. And we also have found the hello bash which is somewhere down there. Okay, now we need to create a function. We have already ready to go command. We have it tested from the prompt and we are ready to put it to the functions. So let me call it fast found. I open this this way and I close it this way and I put my name over here. So I also was told that this should pick up any search word, not only bash. Okay, so we can remove it from here and then we need to specify what we want. The good practice if we actually use some specific variable over here, even if you can use this dollar one and you expect that the variable exist, we usually, and the best practice I usually suggest, well, I'm not sure about we, I usually suggest that you reassign this dollar one to some other variable. It's made in the way that you do not occasionally actually would try to edit this or modify and otherwise you would get error message. So in this case, that should work perfectly. Yeah, I guess so. But let me see, the only error over here is that I don't want to use the quotes, single quotes. I need to use this double quotes. Why? Because I did the explanation at the very beginning of this session, double quotes make the bash to actually open the variables and substitute the variables. Single quotes will just take the word as is with the dollar sign and nothing would happen. So this will really something and let's say that I want to source it once again and I wanna see that type minus AFA and see it's there. And if I wanna try this again with a bash, see whether it works, it works. If I wanna try without bash, does it work? It does work because find will find you everything even if you provide empty stream. So basically it's just we're using this star to tell you that it has lots of file inside. Okay, we don't really want this kind of situation. So we truly want to make sure that actually this word is not empty. What to do in this case, we can use once again the logic and magic of this variable exchange. And then what we do here is that we are supposed to actually give out either the variable itself or the error message. And so that we can say here that what was a directory or search word. So sorry, we are search word is missing. Does it work for us? Yeah, I'm pretty sure this would be already good enough for us, but one thing to remember, we still don't want that this find will be executed. How to do that? And this where we come with another one thing which I didn't tell you yet, but I will tell you on the next session, but I will already use it over here just to make this kind of function complete. So let's say that I will execute it like this and let's see what's going on. So source. And then if I run ff, search word is missing. So it's already completely correct. And so we have just exited the bash. So we don't really need anything over there, but then if you wanna be completely sure what's going on, actually let's don't go that far and let's go to the next session and then I will do the explanation and do the modification to this code already right away. So to have it on the line and go in line with the traditional thing, I can put it as a place. Here you go, bash. So here you go and let's make it more compact like this. Good, so let's get back to the material. So my next step was actually touch a little bit the redirections. So I'm not going to the conditionals yet. So I wanted to tell you something about redirections because I wanna touch a few other things within these subjects. Redirections have been actually pretty much covered, I think, well, due to command line utilities, I think they have been, yeah, redirections have been covered pretty much in the same, in the previous ones. And then also we have, it's quite a lot of things covered also within this material. So that's a kind of advanced one. But let me say a few words because it's important even if you know this, it's still important. So every time, every time when you are running some kind of any command, when you are running any script, whatever program, a lot of happens actually under the hood and one of the thing which has happened is that you are getting along with your running file, several file descriptors open for you. Some of them are reserved and even enumerated. So that's the zero, zero, one and two. And they stands for the standard input, standard output and standard error output. And all of those guys, they actually can be controlled. So you can control where, by default, if you type something like echo or if you type any commands and hit output something, it goes to your standard output. And the standard output is the screen, the terminal of your terminal. So you just see it on your display basically. But you can control where it goes. And one thing to do is to actually do the redirection. And you can redefine actually all of them. But let's say that I want to do the redirection of something which I don't wanna see. I can use, as an example, pink command. So pink, one of the Google DNS servers. What it tells me that if pink goes through, that means I am online. So I don't want this to be interactive. I want to just one single packet which will be sent and then exit it. But I still don't want this one go to the screen. I want only the exit code. And we were talking with you already, the exit code. Even if you don't get any output of the command, you can always take a look at what kind of exit code was given by that command. And if it's succeeded, then the exit code will be zero. If it's not succeeded, it will be something else than zero. One, usually one, or it could be two. It could be in two, five, six, six. So that's kind of exit code. So I think maximum is 256. That's the maximum, but can be wrong. So not really sure. Usually from the programmer perspective, you can, by the number of this output, you can say what exactly has happened and what went wrong. Okay, but in this case, what I'm saying here, I'm used the redirection sign. This says me that I want to redirect the standard output to some other place. So you can do it and redirect it to a file. And that will be part of the exercise. But you can also do something else and you can use the special device called null. On Linux, that means that everything that goes to the dev null will disappear. It will not be seen anywhere. So let's see what will happen over here. Pink is okay. And then if you see that I can actually check the status which has been returned, it's zero. So it's correct. Let's emulate somehow the situation that we didn't reach the pink. So I will not be disconnected myself from here, but let me just come with something which does not exist and which will generate the error message. So in this situation, pink actually has returned the error message. It still came to the screen. And you see that actually the status, the exit code of this command was something which is non-zero, which is already from the point of view if you want to, for instance, run some kind of if or conditional statement. So this will be already good enough to say that, okay, if it's not succeeded, then do that and that. Okay, but we still have one other problem. If there is an error, it's still on the screen. So what we do by default, this redirection sign will redirect everything which goes to the standard output. But we also want to redirect everything which will go to the standard error output. So how to do that? And we can say explicitly here that please redirect the file descriptor number two. And here we put the redirection sign. To the one. So what will happen over here? So from the bash point of view, both standard output and standard error output will be joined together and redirected to the standard output, which means they will go directly to def null. What will happen here is that no error message will appear on the screen.  It's correct. But in the modern version of, so this is the most common syntax for this kind of notation. But in the modern version of the bash, you can also use the compact way. So you can do it the same, but probably the other way around, the other way around. Ah, yeah, that was the problem. Not this one. Yeah. So here you go. Here you actually you get the output, only the exit output. And what else I wanted to introduce you, but actually not the introduction, but the kind of remembering from the previous course is that this exit status can be used with the logical operands, that's the operands and the bash syntax. That's the logical end and logical or, so basically end says that if the exit code of the previous command was not zero, was zero, so if it succeeded, then do next. And we can say that echo, we are online like this, yeah? Let's put the quotes just to be more readable. Essentially, we are not. I mean, we are getting the error message. We are not getting the error message, we are online. And in the same way that if something went wrong, we can always say that echo, we are down. Okay, at the moment we are online, but then if something went wrong, whatever. So we will be getting the message that we are down. So this is my touch on the redirections and then these logical or, logical end and logical or. You can use it within the script easily. You can use it from the command line and this is the most often used, how it's most often used on the command line, but nothing stops you from using this on the screen.  Pipe, this is something which stands for this one. So basically output of this command will be redirected from the standard output of one command to the standard input of the another command. And so let's see how it works. So we have had kind of couple of examples, like for instance, actually we have had already this discusage. So let's try it once again, what I did. So what's happening over here is that we are redirecting everything what they've got from the discusage command to the sort. And the tricky thing that if you want to redirect also the error from the command number first, you will also do it this way. Okay, maybe it's the other way around. So I will, yeah, that's the other way around. But actually if I want to get rid of, if I want to get rid of, for instance, this message, you can do it from this exactly situation. So I don't really want to get everything what comes as an error. I only wanna get something which comes to the standard output. And so you can see that our output is way more clear. Even if it's harmless, it's still, if you wanna make your code robust, you can do it this way. And also have demonstrated you how to do that the other way around. And I think we're pretty much what I was thinking about. So we have eight minutes left, but if you're up for the yet another one exercise, I was actually planning to finish right on this exercise. So we can try to do it right now. And then we will come back to this on Wednesday tomorrow at 12, I'll do the explanation. So let's say that the rest of the time you spent playing with the redirection and piping this exercise. Do as much as you want, as much as you can. I'll be here probably for the next 15 minutes at least. And we will continue otherwise tomorrow at 12. And in the RICO, if you want to get something like how complicated material is, that's also a good chance to do it right now. But otherwise, let's say that our last exercise for today is this one redirection and piping. So try to do it. That should be fairly easy, but except the last one. Last one will probably take you some time to get to the point, but it's also doable. There should be no something, no much of the troubles. Okay, let's try to do this. And then I will get back to the screen. We will be about three minutes late running today, but let's hope that's okay.