| *** tboimah has quit (Remote host closed the connection) | 08:08 | |
| *** dcammue has quit (Quit: Leaving) | 11:19 | |
| tboimah | Good morning Mr. Cole | 12:59 |
|---|---|---|
| ubuntourist | Hi | 13:00 |
| ubuntourist | tboimah, do you know if we're waiting for mulbah? | 13:00 |
| tboimah | let give he some minute and see | 13:01 |
| tboimah | him* | 13:01 |
| ubuntourist | OK | 13:01 |
| tboimah | Is there going to be any task for us to do today. | 13:02 |
| ubuntourist | Good question: I really should plan better and come up with a better curriculum. | 13:03 |
| ubuntourist | I'm thinking about going back to the end of the long movie I sent where I was trying to find | 13:04 |
| ubuntourist | all files ending in ".ly" and do something with them. It was a very practical example, because it | 13:04 |
| tboimah | yeah, it is going to be good when you give us problem to solve on our own | 13:04 |
| ubuntourist | really was something that I needed to do for myself. | 13:04 |
| ubuntourist | But on Friday I suggested that you should experiment with creating an environment variable in your | 13:06 |
| ubuntourist | computer's /etc/skel/.profile and create a new user, and you should experiment with "diff" | 13:07 |
| ubuntourist | Were you able to do any of that? | 13:07 |
| tboimah | yeah, i experiment on that | 13:07 |
| ubuntourist | I think the plan from Jeff is for you to become systems administrators for the school, and the Jetro co-op will be | 13:09 |
| ubuntourist | part of the school. So you will be systems administrators for the co-op too. Am I ccrrect? | 13:10 |
| tboimah | yes | 13:10 |
| ubuntourist | OK. So, think about what students and teachers might need to have on a computer. We will start with their needs | 13:11 |
| ubuntourist | first, because they are the "customers" that you will probably know the best. I do not know if Jetro Web Development has | 13:12 |
| ubuntourist | clients yet. Do you know if anyone is asking for web development from the co-op? | 13:12 |
| tboimah | no we have not yet have any clients | 13:13 |
| tboimah | for now | 13:13 |
| ubuntourist | When I say "think about the needs of teachers and students" use your imagination: What subjects are being taught? | 13:14 |
| ubuntourist | There may be software that helps teach a particular subject. There may be free books to download and make available in shared | 13:14 |
| ubuntourist | directories. | 13:15 |
| ubuntourist | You will need to help choose the software, documents, etc. Install them, learn about configuring them, and how to share them, | 13:15 |
| ubuntourist | and keep them updated. | 13:16 |
| ubuntourist | Using dpkg, apt, and apt-cache we learned aobut what sofrware is already installed, how to install new software, and how to search for sofftware. | 13:17 |
| tboimah | sure. | 13:18 |
| ubuntourist | Using mkdir, chmod and chown, we learned about ownership and file permissions, and sharing documents and little programs we can write. | 13:19 |
| ubuntourist | Now we're looking at "configuring" the sofftware to behave a specific way, starting with configuring the Bash shell itself, | 13:20 |
| ubuntourist | altering ~/.profile, ~/.bashrc, and ~/.bash_aliases first, -- for our own personal use, and then the same files in /etc/skel/ to configure | 13:21 |
| ubuntourist | new users with changes that are beneficial to all users. | 13:22 |
| ubuntourist | Really, these tasks -- install and update software packages, configure software for system-wide use, and install documents and share data | 13:23 |
| ubuntourist | will be 85% of your job. | 13:23 |
| ubuntourist | Troubleshooting and diagnosing problems will be the other 15%. | 13:24 |
| ubuntourist | That last 15% is hard to teach: It means I have to break something and then have you try to find what I have broken and how | 13:24 |
| ubuntourist | to fix it. | 13:24 |
| ubuntourist | Also, for troubleshooting and diagnosing you will both need "not be shy" about talking with complete strangers. I have been doing systems admin | 13:26 |
| tboimah | okay | 13:26 |
| ubuntourist | for a long time, and I still join mailing lists and ask questions. And I am a registered user on several StackExchange sites where I ask questions. | 13:27 |
| ubuntourist | I do not know enough about your environment. Can you tell me approximately how many teachers and students, which age range and levels are taught, | 13:29 |
| ubuntourist | and which subjects? Testing schedule? Hours of instruction? Time off / vacations? | 13:30 |
| ubuntourist | I'm trying to use my imagination: Maybe teachers and students will want a shared calendar for keeping track of teacher meetings and exam schedules. | 13:31 |
| ubuntourist | Maybe they will want mailing lists for different groups. | 13:31 |
| ubuntourist | Maybe a database to keep track of students enrolled or keep track of grading. | 13:32 |
| ubuntourist | Students might need software that teaches typing or math skills and then quizzes them to see what they have learned. | 13:33 |
| ubuntourist | Which languages, other than English, are common where you live? | 13:34 |
| tboimah | only English | 13:34 |
| tboimah | some time french but it is not really common | 13:35 |
| ubuntourist | OK. I asked, because Linux offers "language packs" and you can install them. So, you could install a French language pack, | 13:35 |
| ubuntourist | and configure a user's environment so that when they log in, everything is in French instead of English. All error messages, help and documentation | 13:36 |
| ubuntourist | for those users would be in French. But, if it is not very common, then it will not be an advantage, unless some students are studying a foreign language. | 13:37 |
| ubuntourist | I'm thinking about where to go next today. I think I want to go back to the movie and README and TestData that I sent... | 13:39 |
| tboimah_ | Ok. it will not ba a problem | 13:40 |
| tboimah_ | be* | 13:40 |
| ubuntourist | But I'm trying to remember where we stopped. I think it was at the beginning of the section on the "for" loop. | 13:40 |
| tboimah_ | yeah | 13:41 |
| tboimah_ | Mulbah just call me he say he will not be able to come online today | 13:42 |
| tboimah_ | said* | 13:42 |
| ubuntourist | Review: Can you summarize what you remember about the movie an README? | 13:42 |
| tboimah_ | in the movie we locate all the file that have ly in it | 13:43 |
| *** fkoikoi has quit (Ping timeout: 480 seconds) | 13:44 | |
| *** tboimah has quit (Ping timeout: 480 seconds) | 13:44 | |
| tboimah_ | and not stoping their all the file that was having the extension .ly at the end | 13:44 |
| tboimah_ | and some file was in /etc/... but we was wanted the file that was in /home/kjcole, so we locate all file that was ending in .ly that was in the directory /home/kjcole | 13:46 |
| ubuntourist | Pretty good so far. Just a little bit more filtering happened... | 13:47 |
| tboimah_ | we also eliminate all file that was not create by use, we was only want file that was create by us so we use the egrep -v to do that | 13:48 |
| ubuntourist | Excellent! I THINK that is where we stopped... | 13:49 |
| tboimah_ | sure | 13:49 |
| ubuntourist | I need a short bathroom break. When I come back we will use your tmate. | 13:51 |
| ubuntourist | ACTION takes a break | 13:51 |
| tboimah_ | okay | 13:51 |
| ubuntourist | ACTION is back | 13:53 |
| tboimah_ | ssh G6SVxJRrUFCQ9dfMuT25zpqKV@lon1.tmate.io | 13:54 |
| ubuntourist | OK we're good to continue. | 13:55 |
| ubuntourist | You have learned some basic Python programming, right? | 13:57 |
| tboimah_ | yeah, a little | 13:57 |
| ubuntourist | Did you do "for" loops with Python? | 13:57 |
| ubuntourist | (We will be using a "for" loop in Bash, and it is a similar idea.) | 13:58 |
| tboimah_ | i am reading python because i learn that to become a good sysadimi you need to know python. yes | 13:58 |
| ubuntourist | That is true: There are several good languages to know about. Especially Python and Perl, but Perl is harder to learn. | 14:00 |
| ubuntourist | For now focus on both the Bash shell -- which is what I have been focusing on, and Python. Perl can come later.. | 14:00 |
| tboimah_ | okay | 14:01 |
| ubuntourist | So, in your terminal, can you use Python right now and demonstrate a simple for loop? | 14:01 |
| ubuntourist | (You can make the program do whatever you want. Just include a for loop. Maybe a program that prints numbers from 0 to 10.) | 14:02 |
| ubuntourist | ACTION is grabbing a glass of water. Be right back. | 14:04 |
| ubuntourist | ACTION is back and waiting to see a for loop demonstation... | 14:05 |
| ubuntourist | Now just enter | 14:09 |
| ubuntourist | enter again | 14:09 |
| ubuntourist | OK. | 14:09 |
| tboimah_ | ACTION done | 14:10 |
| ubuntourist | (This is why you need to practice. Obviously, you knew what to do, but there were lots of small mistakes before you got | 14:10 |
| ubuntourist | all of the pieces working.) | 14:10 |
| tboimah_ | yeah | 14:10 |
| ubuntourist | And when you sent me e-mail where you tried to use the Bash for loop and had many errors, it was | 14:11 |
| ubuntourist | the same problem. Sometimes you had a starting quote without an ending quote | 14:11 |
| ubuntourist | and sometimes you included a space where there should not be a space. | 14:12 |
| ubuntourist | But it was hard to see those mistakes. When I looked at your message, it took me several minutes to | 14:13 |
| ubuntourist | figure out where you had added a space or missed a quotation mark. | 14:13 |
| ubuntourist | So, exit python. | 14:13 |
| ubuntourist | In Bash, for loops look like: | 14:14 |
| ubuntourist | for variable in a list of values | 14:15 |
| ubuntourist | do | 14:15 |
| ubuntourist | first command variable | 14:15 |
| ubuntourist | second command variable | 14:15 |
| ubuntourist | third command variable | 14:16 |
| ubuntourist | done | 14:16 |
| ubuntourist | That's not very clear, but I hope you see the basic idea: | 14:16 |
| tboimah_ | sure | 14:16 |
| ubuntourist | for ... in ... ... ... ... | 14:16 |
| ubuntourist | do | 14:16 |
| ubuntourist | ls ... | 14:16 |
| ubuntourist | most ... | 14:17 |
| ubuntourist | done | 14:17 |
| ubuntourist | So let's try a simple example: | 14:17 |
| ubuntourist | for i in * | 14:17 |
| ubuntourist | do | 14:17 |
| ubuntourist | echo $i | 14:17 |
| ubuntourist | done | 14:17 |
| ubuntourist | (Go ahead adn type those four lines.) | 14:18 |
| tboimah_ | ACTION done | 14:19 |
| ubuntourist | "i" is just a variable name. When you use it in the "for" line it defines the variable | 14:19 |
| ubuntourist | the same way as "for num in range(1, number)" defined "num". | 14:20 |
| ubuntourist | To use it after you define it, you need to add the "$" to it --- "$i" | 14:20 |
| ubuntourist | The "*" was the "wildcard" character.. So, Bash expanded it and made it into a list of all the files that it could see in the directory. | 14:21 |
| ubuntourist | "echo" is like the Python "print(...)" | 14:21 |
| ubuntourist | and the for loop needs a "do" which is like the ":" in Python, and a "done" to tell it wnen to finish. | 14:22 |
| ubuntourist | But if you press the up-arrow only once right now, it will show you the whole program on one line. Do that. | 14:23 |
| ubuntourist | It adds the ";" automatically. It will take time to determine when you want a ";" and when you do not. | 14:24 |
| ubuntourist | I prefer to enter the program in the way you typed it originally (and the way I showed above) | 14:25 |
| ubuntourist | because it is much clearer to read. | 14:25 |
| ubuntourist | You can have more than one command in the for loop | 14:26 |
| ubuntourist | for filename in * | 14:26 |
| ubuntourist | do | 14:26 |
| ubuntourist | echo "The next line shows the filename" | 14:26 |
| ubuntourist | echo $i | 14:27 |
| ubuntourist | done | 14:27 |
| ubuntourist | (Ctrl-U to erase the current line and then type the five lines above) | 14:27 |
| ubuntourist | Oops. There is a mistake in my code above. Can you see it? I made a typo. | 14:28 |
| ubuntourist | (Can you tell me what the mistake is?) | 14:29 |
| tboimah__ | sorry my connection drop | 14:31 |
| ubuntourist | Yep. I saw that. So, what is the last thing you saw me type in IRC? | 14:31 |
| tboimah__ | for filename in * | 14:32 |
| tboimah__ | that was the last thing i saw | 14:32 |
| ubuntourist | OK. | 14:32 |
| ubuntourist | for filename in * | 14:32 |
| ubuntourist | do | 14:32 |
| ubuntourist | echo "The next line will print a filename" | 14:33 |
| ubuntourist | echo $i | 14:33 |
| ubuntourist | done | 14:33 |
| ubuntourist | Ooops. There is a mistake! | 14:33 |
| ubuntourist | I typed something wrong. | 14:33 |
| ubuntourist | Can you tell me what the mistake is above? There are two different ways to fix it. | 14:34 |
| tboimah__ | yeah | 14:34 |
| *** fkoikoi_ has quit (Ping timeout: 480 seconds) | 14:34 | |
| *** tboimah_ has quit (Ping timeout: 480 seconds) | 14:34 | |
| tboimah__ | firstly i am seeing to print statement which is echo "The next line will print a filename" and echo $i | 14:35 |
| ubuntourist | (By the way, the keyboard shortcut Ctrl-U will erase the current line in the terminal when you are at the command prompt.) | 14:39 |
| ubuntourist | So, how would you fix the typing mistake I made? There are two different ways you could fix it. | 14:41 |
| ubuntourist | I am hoping you can tell me both ways. | 14:41 |
| tboimah__ | hmmm i do not think so i just started learning python | 14:43 |
| ubuntourist | (Seventeen minutes left today.) | 14:43 |
| ubuntourist | Well, then I think i will stop for today. Read through today's IRC log and see if can get the answer. | 14:44 |
| tboimah__ | okay | 14:45 |
| ubuntourist | I think you will find the right answer if you review today's log. | 14:45 |
| ubuntourist | Both you and mulbah have demonstrated good skills for understanding this. So, I am | 14:45 |
| ubuntourist | fairly confident that you will see it when you review. | 14:46 |
| tboimah__ | okay i will do that | 14:46 |
| ubuntourist | Send me a short e-mail when you see the mistake. And remember: There are two different ways | 14:46 |
| ubuntourist | to fix it. Explain briefly, both ways. | 14:47 |
| ubuntourist | Bye for now! | 14:47 |
| tboimah__ | okay | 14:47 |
| tboimah__ | okay thanks for today | 14:47 |
| *** ubuntourist has quit (Quit: Leaving) | 14:47 | |
| tboimah__ | bye! | 14:47 |
| *** fkoikoi__ has quit (Ping timeout: 480 seconds) | 15:37 | |
| *** tboimah__ has quit (Ping timeout: 480 seconds) | 15:37 | |
| *** fkoikoi has quit (Ping timeout: 480 seconds) | 15:47 | |
| *** fkoikoi_ has quit (Quit: Leaving) | 16:35 | |
| *** mulbah has quit (Ping timeout: 480 seconds) | 17:59 | |
| *** tboimah has quit (Ping timeout: 480 seconds) | 22:11 | |
| *** tboimah has quit (Ping timeout: 480 seconds) | 22:30 | |
| *** tboimah_ has quit (Ping timeout: 480 seconds) | 22:34 | |
| *** shmohamud has quit (Remote host closed the connection) | 22:38 | |
| *** shmohamud has quit (Remote host closed the connection) | 22:41 | |
| *** tboimah has quit (Ping timeout: 480 seconds) | 22:47 | |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!