*** shmohamud has quit (Remote host closed the connection) | 00:23 | |
*** shmohamud has quit (Remote host closed the connection) | 00:46 | |
*** shmohamud has quit (Remote host closed the connection) | 01:00 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 03:08 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 04:10 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 06:12 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 08:13 | |
*** jelkner_ has quit (None) | 10:07 | |
*** jelkner has quit (Quit: Leaving) | 10:08 | |
dcammue | Good morning everyone | 10:54 |
---|---|---|
fkoikoi | Good Morning Jeff | 10:55 |
jelkner | Good morning. | 10:55 |
jelkner | Apologizes for the last minute notice, but I am going to have to ask to postpone this meeting until tomorrow. | 10:56 |
jelkner | I had an electrical fire in my classroom last night. | 10:57 |
jelkner | So I have no electricity. | 10:57 |
fkoikoi | Alright | 10:57 |
jelkner | I'm on my phone now, but I can't access the info I need. | 10:58 |
jelkner | Good morning Shallon. | 10:58 |
fkoikoi | okay | 10:58 |
svaye | Good morning Jeff | 10:58 |
jelkner | Will you be at our meeting tomorrow? | 10:59 |
fkoikoi | I guess I will just add it to the agenda for tomorrow meeting | 10:59 |
jelkner | Can we meet a little early? | 10:59 |
fkoikoi | by what time? | 11:00 |
svaye | I will be in the meeting tomorrow | 11:00 |
jelkner | Mainly I wanted to ask Shallon and Daniel if they saw the assignment I gave the web class? | 11:00 |
svaye | I haven't seen it Jeff | 11:02 |
svaye | I have a hard time getting to the website that have the web class activities | 11:02 |
jelkner | Can you meet tomorrow at 8:30 am my time? | 11:04 |
fkoikoi | +1 for me | 11:05 |
svaye | That will be like 12:30 pm our time right jelkner | 11:05 |
*** dcammue has quit (Ping timeout: 480 seconds) | 11:06 | |
jelkner | Good morning Daniel, can you meet tomorrow at 12:30 pm your time? | 11:06 |
svaye | it's okay with me | 11:06 |
dcammue_ | svaye I will help you with the website to the activities | 11:07 |
jelkner | Great, let's get svaye, fkoikoi, jelkner, dcammue, and scooper together. | 11:07 |
dcammue_ | yes | 11:07 |
dcammue_ | i will | 11:07 |
scooper | Good morning Jeff | 11:07 |
jelkner | To talk about the web study. | 11:07 |
scooper | I m here | 11:08 |
dcammue_ | alright | 11:08 |
jelkner | OK the electrician is here. | 11:08 |
jelkner | I need to talk with him. | 11:08 |
jelkner | Let's continue tomorrow morning. | 11:08 |
scooper | Ok | 11:08 |
dcammue_ | okay | 11:09 |
jelkner | Thanks everyday! | 11:09 |
dcammue_ | have a nice day | 11:09 |
dcammue_ | take care jelkner | 11:09 |
svaye | Have a nice day Jeff | 11:09 |
jelkner | I will if I get power back ;-) | 11:09 |
jelkner | Otherwise, no promises. | 11:09 |
*** fkoikoi has quit (Read error: Connection reset by peer) | 11:10 | |
jelkner | Just glad irc works from my phone. | 11:10 |
*** jelkner has quit (Quit: Quit) | 11:10 | |
dcammue_ | I have been trying to do that but can't work | 11:11 |
dcammue_ | on my phone | 11:11 |
*** dcammue_ has quit (Quit: Leaving) | 11:12 | |
*** svaye has quit (Quit: Leaving) | 11:12 | |
*** fkoikoi has quit (None) | 11:14 | |
*** fkoikoi_ has quit (Quit: Leaving) | 11:17 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 12:16 | |
*** tboimah has quit (Quit: Leaving) | 12:40 | |
tboimah | Good morning Mr. Cole | 13:02 |
ubuntourist | tboimah, Hi | 13:02 |
ubuntourist | Do you know if mulbah will be attending? | 13:03 |
tboimah | Hmmm I don't really know, but let give him some time | 13:04 |
ubuntourist | OK. Were you able to experiment with that loop with a mistake? | 13:06 |
ubuntourist | I am starting up a tmate | 13:07 |
ubuntourist | ssh sPzsfsnpMfVDxTHeGms98TW6D@lon1.tmate.io | 13:07 |
tboimah | yeah i did by adding the "$" to the filename because it was already define in the loop so to use it again you have to use it with the "$" sign | 13:08 |
tboimah | and when i did it it print all of the directory in the /home/tboimah | 13:09 |
ubuntourist | Yes, but the text said "The NEXT line will print a filename". That text was correct... | 13:10 |
ubuntourist | It should not print "The next line will print Music" or "The next line will print test.py" or "The next line will print hello.txt" | 13:13 |
ubuntourist | (I mean It should not print "The next line will print a Music" or "The next line will print a test.py" etc. | 13:14 |
ubuntourist | It shoul print "The next line will print a filename" and then, underneath it, the filename should be printed. | 13:14 |
tboimah | Ahhh okay | 13:15 |
ubuntourist | But in my test in tmate, the line underneath is empty. So, what should change to fix that? | 13:15 |
ubuntourist | Hello? Still there? | 13:19 |
tboimah | yeah i am still looking for the answer | 13:19 |
ubuntourist | OK. Try this another way: Explain each line in the code on the tmate screen. (The four lines of "oops"( | 13:20 |
tboimah | The first line is saying that any filename in the current working directory it should do: | 13:25 |
tboimah | The next line will print a filename | 13:26 |
ubuntourist | Careful: "filename" is nothing magical her.... The asterisk (*) is the wildcard that means "all files". | 13:27 |
ubuntourist | And no. The next line will NOT print a filename. It will print what is between the quotes. | 13:27 |
tboimah | yeah but it is the next line will print a filename between the quotes | 13:28 |
ubuntourist | ("filename" is nothing magical here -- was what I ment to say.) | 13:28 |
ubuntourist | The word "filename" in this script has no special meaning.... Think about your Python code What comes after "for"? What is the meaning of the word after "for" in a pythin script? | 13:30 |
ubuntourist | (My typing is horrible this morning. Lots of small typos.) | 13:30 |
tboimah | this is what "the next line will print a filename" in the quotes so it is what going to print | 13:30 |
tboimah | that is what i mean i am not saying filename is doing something diffrence in the code | 13:31 |
ubuntourist | Correct. Now think about "for" in Python. The "for" in Bash. Go back to your simple counting program.... | 13:32 |
ubuntourist | (The "for" in Bash works very much like the "for" in Python is what I am trying to say.) | 13:32 |
tboimah_ | sorry my connection drop | 13:34 |
ubuntourist | Correct. Now think about "for" in Python. The "for" in Bash works very much the same way. Think about your counting | 13:35 |
ubuntourist | program in Python. | 13:35 |
ubuntourist | Do NOT press enter in the tmate. Just look at what is on the screen right now, and tell me what it would do. | 13:36 |
ubuntourist | Then think about how you printed the numbes before... | 13:37 |
ubuntourist | THEN go back and think about the Bash script wihich is still appearing on the screen. | 13:37 |
tboimah_ | can you send me a link to join tmate again my connection drop | 13:37 |
ubuntourist | ssh sPzsfsnpMfVDxTHeGms98TW6D@lon1.tmate.io | 13:38 |
*** scooper has quit (Ping timeout: 480 seconds) | 13:39 | |
*** tboimah has quit (Ping timeout: 480 seconds) | 13:39 | |
tboimah_ | it is going to print "some text" | 13:41 |
tboimah_ | up to hunderd(100 | 13:41 |
ubuntourist | Yes. | 13:42 |
ubuntourist | So to make it print the number also, you would need to do a little bit more. | 13:42 |
ubuntourist | Now look at the Bash script on the screen and think about it the same way. | 13:43 |
ubuntourist | ("echo" is Bash's "print(...)" statement.) | 13:43 |
*** sysadmin_ has quit (Read error: Connection reset by peer) | 13:43 | |
ubuntourist | So to make it print the number also, you would need to do a little bit more | 13:46 |
ubuntourist | Now look at the Bash script on the screen and think about it the same way | 13:46 |
ubuntourist | ("echo" is Bash's "print(...)" statement.) | 13:47 |
*** tboimah_ has quit (Ping timeout: 480 seconds) | 13:50 | |
tboimah | you once said that in a Bash script when a variable has been us in a for loop, to use it again in the print statement you should add "$". so for me i think we should add "$" to ("filename") so that it can be able to print those file name. | 13:52 |
tboimah | To admit i having hard time understanding the Bash script, is there any Book for it. | 13:54 |
ubuntourist | How is it different from the python script. | 13:55 |
ubuntourist | tboimah, we are joined by jelkner in the tmate right now, in case you are wondering. | 14:04 |
tboimah | Ahh okay | 14:04 |
ubuntourist | OK... | 14:07 |
ubuntourist | Back to you tboimah | 14:07 |
tboimah | yeah | 14:08 |
ubuntourist | tboimah, once again, I encourage you and mulbah to show off tricks like tmate, script and scriptreplay to jelkner.. | 14:08 |
tboimah | okay | 14:09 |
ubuntourist | tboimah, plan a nice little presnentation and demo. Think about it beforehand and create a lesson that you could use | 14:09 |
ubuntourist | with students. | 14:09 |
ubuntourist | But back to the Bash script. | 14:09 |
tboimah | okay i will do that | 14:10 |
tboimah | yes back to Bash script | 14:10 |
ubuntourist | I do not understand why you see the Python script as easy and the Bash script as hard. They are | 14:10 |
ubuntourist | almost identical | 14:10 |
ubuntourist | number = 100 | 14:11 |
ubuntourist | for num in range(number): | 14:11 |
ubuntourist | print("Some text") | 14:11 |
ubuntourist | print(num) | 14:11 |
ubuntourist | That's the Python. Below is my broken Bash script: | 14:12 |
ubuntourist | for filename in * | 14:12 |
ubuntourist | do | 14:12 |
ubuntourist | echo "The next line will print a filename" | 14:12 |
ubuntourist | echo $i | 14:12 |
ubuntourist | done | 14:12 |
ubuntourist | In rhe Python script what is "num"? | 14:12 |
ubuntourist | In the Bash script, what is "filename"? | 14:13 |
tboimah | Okay i think i understand you code now let tmate so that i show you something | 14:13 |
ubuntourist | You can use the tmate from before. | 14:14 |
ubuntourist | It should connect you back to my session. | 14:14 |
ubuntourist | ssh sPzsfsnpMfVDxTHeGms98TW6D@lon1.tmate.io | 14:15 |
tboimah | in your code the second echo should have print $filename instead of echo $i | 14:15 |
ubuntourist | BINGO! | 14:15 |
ubuntourist | I wanted you to see that yourself, not have me tell you. | 14:15 |
tboimah | Now i understand your code | 14:15 |
ubuntourist | In my script with a mistake, $i is UNDEFINED. It would be like telling Python to print(x) when there is no variable named x. | 14:16 |
tboimah | It was a fun figuring out the answer | 14:16 |
ubuntourist | Normally, when I write a Bash script for myself, I use "for i in..." (The letter "i" is an ooooold habit: | 14:17 |
ubuntourist | I used an old programming language FORTRAN for many, many years, and "i" was commonly used as a variable for an | 14:18 |
ubuntourist | for holding an integer value. | 14:18 |
ubuntourist | But, if I am trying to write something for other people to understand, I often choose vaiable names with more meaning. | 14:19 |
ubuntourist | When I was trying to type it to you last week, I slipped up: I used a good varialbe name "filename" at the start, but | 14:19 |
ubuntourist | accidentally reverted to my old habit when I wrote "echo $i" | 14:20 |
ubuntourist | I saw my mistake immediately, but I wanted you to see my mistake. | 14:20 |
tboimah | yeah it was a fun figuring out your mistake | 14:21 |
ubuntourist | We will be going back to the more compliacated bash script that you sent me e-mail about. | 14:21 |
ubuntourist | You tried to copy something from the README or the script movie, and it didn't work. That's beccause it | 14:22 |
ubuntourist | is a more complex script and you had two very small typing mistakes. They were hard for me to find. | 14:22 |
ubuntourist | I will explain more about the problem, but for now the two hints for each mistake. | 14:23 |
ubuntourist | In one place, you added a space character where there was no space in the original. This broke a regular expression, | 14:24 |
ubuntourist | because yo were telling it that a space was part of the pattern to seach for, and there were no strings that | 14:25 |
ubuntourist | contained a space. | 14:25 |
ubuntourist | The second mistake was that you used an opening quote mark somewhere, and never added a closing quote | 14:25 |
ubuntourist | mark. That means that all off the lines tha followed were inside the quote and were interpreted as text strings, | 14:26 |
ubuntourist | not commands. | 14:26 |
ubuntourist | I'm actually feeliing a bit tired today: I had a vaccination shot yesterday, and I think it is wearing me out. | 14:27 |
tboimah | Ahhh okay that means you need some rest | 14:29 |
ubuntourist | Your Linux Command Line book has a section on writing shell scrips | 14:29 |
ubuntourist | We are using the Bash shell and so is the book. So, PART 4: WRITING SHELL SCRIPTS is all about what we are doing. | 14:30 |
ubuntourist | (You probably should try ti read all the parts before that. So maybe we will go back to following thee book more. | 14:31 |
tboimah | okay i will take a look at it | 14:32 |
ubuntourist | I think we were at Chapter 11 or 13 in PART 2. I am skipping Chapter 12, because it is all about the "vi" editor, and | 14:32 |
ubuntourist | I don't really use "vi" as my editor. So, I will leave that for you to study on your own. | 14:33 |
tboimah | okay | 14:33 |
ubuntourist | I am hoping that you both understood Chapters 1 to 10, but if you have questions about those chapters, | 14:34 |
ubuntourist | we can review. | 14:34 |
ubuntourist | So, I think I am going to quit early today. See you on Monday. Share with Mulbah if you can. | 14:35 |
tboimah | okay thanks for today | 14:36 |
tboimah | Have a nice day | 14:36 |
ubuntourist | Bye! | 14:36 |
tboimah | Bey! | 14:36 |
tboimah | bye* | 14:36 |
*** ubuntourist has quit (Quit: Leaving) | 14:36 | |
*** tboimah has quit (Remote host closed the connection) | 15:01 | |
jelkner | Hello tboimah | 15:18 |
tboimah | Hello jelkner | 15:30 |
jelkner | i'm working with a student and we are going to try tmate | 15:49 |
jelkner | are you going to be here for a few more minutes? | 15:50 |
jelkner | maybe you could try to join at the same time | 15:50 |
jelkner | Kevin showed me that tech. It looks awesome! | 15:50 |
tboimah | yeah | 15:53 |
avaldez | hi scooper | 15:56 |
*** scooper has quit (Read error: Connection reset by peer) | 15:56 | |
avaldez | this is jelkner | 15:56 |
avaldez | but i'm using avaldez' | 15:56 |
avaldez | s comnputer | 15:56 |
avaldez | we are about to try out tmate | 15:56 |
jejemplo | scooper, tboimah, i'm here with Adrian Valdez, one of my students | 15:59 |
jejemplo | We are about to try tmate | 15:59 |
tboimah | Okay, that sound great! | 15:59 |
jejemplo | ssh PcbegTFcLv7RZsexywDzn29rT@nyc1.tmate.io | 16:01 |
scooper | OK jejemplo | 16:02 |
scooper | that is great | 16:02 |
*** tboimah has quit (Quit: Leaving) | 16:31 | |
*** scooper has quit (Remote host closed the connection) | 16:39 | |
*** avaldez has quit (Remote host closed the connection) | 16:51 | |
*** jelkner has quit (Ping timeout: 480 seconds) | 17:17 | |
*** jejemplo_ has quit (None) | 18:05 | |
*** jejemplo__ has quit (None) | 18:05 | |
rlucier | hello | 18:06 |
jejemplo | ssh 2tnEJgpfNvgSqqDvSVvp9Ws5C@nyc1.tmate.io | 18:07 |
*** rlucier has quit (Remote host closed the connection) | 18:50 | |
*** jelkner_ has quit (Quit: Leaving) | 19:06 | |
*** jejemplo has quit (Quit: Leaving) | 19:09 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!