I think it started. Thank you for joining us for this last day of the first week of the CNI virtual fall 2020 member meeting. I'm the director of CNI Cliff Lynch. And I'll be introducing this rather briefly. I'm going to talk about a couple of logistical things. This is being recorded and we will be making this session publicly available later. There is closed captioning available if you like to turn it on. We do have a chat stream available and please feel free to use the chat stream for comments or to introduce yourself as the session goes on. We have a Q&A tool at the bottom of your screen. We'll hold all the questions till the end at which point Diane Goldenberg Hart will materialize to moderate the question and answer session but please feel free to ask questions at any point as they occur to you. I think that's everything in terms of logistical stuff. This is the session we have with us Paul Brackie from Gonzaga and also Jean McManus from the University of Notre Dame. The presentation today I think is going to be quite interesting. It deals with the development of a Catholic news archive. There are a number of efforts that I am aware of to capture various collections of often smaller newspapers that were in distribution around America for many, many years. They tend to be really fascinating because they map into all kinds of immigrant communities and ethnic communities and things of that nature and really give us a wonderful set of insights into parts of the history of this country that aren't well known. So I think this will be a very interesting presentation and I'm very much looking forward to it. With that, let me just hand it off to Paul and say Jean and Paul, thank you so much for joining us. Over to you. Great, thanks Cliff. And thanks to all of you for joining us this afternoon. So I'm Paul Brackie, Dean of the Foley Library at Gonzaga University, and I'm also a member of the Board of the Catholic Research Resources Alliance, which is really the sponsoring organization of the Catholic news archive. My co-presenter is Jean McManus, a librarian for Catholic Studies and Archives Engagement at the University of Notre Dame, and we're really excited today to be able to share the work of the Catholic of the CRA, the Catholic Research Resources Alliance with you today on the Catholic news archive. And we'd also be remiss without acknowledging the contributions of Jennifer Younger, Executive Director of CRA for her contributions in developing the presentation. So we're just going to start by providing an overview of the initiative and the project, move into a discussion of the research value of the collections, and then move into a brief discussion of some of what we think are maybe the most pressing directions for future activities for the group. So, just start with a little bit of background. The Catholic news archive is a program of the Catholic Research Resources Alliance, CRA, as I mentioned. CRA is an independent membership organization that seeks to provide global access to Catholic research resources. And we have about 50 members and partners. Many of these are academic libraries like Notre Dame or Gonzaga, Marquette, University of San Diego, places like that. And it also includes other sorts of cultural heritage institutions that have other unique contributions to make to our work. So, for example, we have religious congregation and diocesan archives such as the Archdiocese of Cincinnati, the Catholic Historical Research Center of the Archdiocese of Philadelphia and the Daughters of Charity Provincial Archives, as some of our members. The CRA has done through a number of programs, including the Catholic portal, which provides discovery to rare and difficult to locate Catholic research resources from across the Alliance's memberships. But really, the one, the one major initiative that we're here to share today is the Catholic news archive. So just to give you some context for the archive itself, the Catholic news archive is a digital collection of North American Catholic newspapers that is freely available to users and currently consists of about 500,000 digitized pages from 17 newspapers. And these papers cover a range of dates, geography and communities. Gene's going to discuss the research value of the collections in a little bit, but just to give you a few examples of some of the interesting newspapers that we have in the collection. You know, as a native St. Louis and I had to pick out the Shepherd of the Valley, which is the first newspaper of the Archdiocese of St. Louis, which was published in their 1830s and was an English and French language newspaper. Another interesting one is the Catholic worker newspaper started by Dorothy Day. And one that I'm also drawn to is La Esperanza, which was a national Catholic Spanish language newspaper in Los Angeles, published from the 30 from the late 20s through the 50s. And it focused on Catholic topics related to the US Spanish speaking population with a particular focus on the Mexican American community and had a unique transnational perspective. So within the archive, you know, scanning and conversion meter exceed the standards of the national digital newspaper program with article and page level indexing done in with Metz Alto can widely used for newspaper digitization projects around the world. Our platform that we use is Viridian, a company based in New Zealand, provides a mobile mobile friendly platform, again used by many, many digital newspaper digitization projects, including the State Library and National Library even projects. So here's a screenshot so that you can just get a feel for what it looks like. So what I'd like to discuss now is really how we've gotten to really have the archive that we have. So the Catholic newspaper archive has been developed with a set of development and partnership strategies to guide the effort. I'll start with some of the developments. Prior to the sequencing number of these on the slide but they're just a couple that I'd like to particularly highlight. So really just a fundamental, fundamental principle for us is that we've really been wanting to design this design this archive with concern for functionality and access for researchers. We acknowledge that there is probably other uses, which we would encourage, but the use by researchers has really been primary in the development of the archive. The goal of the archive is to provide long term barrier free access to the collection. But, you know, in the interest of the newspaper publishers who are partners, it also reserves rights for commercial use to those to those newspaper publishers. And, you know, finally, I think, and this is something that I think is really incredibly important about Catholic news newspaper archive but also CRAs work in general, is that a goal of the project has been to allow the participation of a range of participants in the project in a variety of roles. And this includes participation from small academic libraries who might not otherwise have the resources or opportunity to participate in large scale digitization projects, but also as, as the our membership list may indicate, also other types of institutions that might not always be included as partners with academic libraries and these sorts of projects. In the news archive in particular some examples of these would be our many diocesan archives partner partners, the Catholic communication campaign of the US Conference of Catholic bishops, and also a community of women religious. So, you know, partnerships are really important are really incredibly important to us in our work. And we've get engaged in a, you know, in a number of activities to develop these partnerships on different levels. First, as I mentioned in the previous slide, a, you know, one of our goals is one of our key partners is our news or would be our newspaper newspaper publishers. You know, without permissions and their partnership. This, this, this archive couldn't exist. And, you know, one thing that we found interesting is that openness has really been a selling point to this partners for whom a primary concern is really expanding their communities of readers, as well as, you know, there's also an interest in contributing to scholarly communication, scholarly community, the scholarly community at large. And we're able to partner with them in a manner that allows for open distribution of their publications while also reserving the right rights for them to engage in some commercial reuse as they wish. So for this, so for example, there might be digitization of sacramental records that would be listed in newspapers through commercial sources. You know, so I think that, you know, key point that Jennifer younger always makes is that for our publishers it's, you know, participation, the decision to participate with the Catholic news archive versus commercial outfits is not necessarily an either or proposition for them. There's an extent to which they can do both and in fact some of our partners have been able to leverage their commercial digitization activities to be able to contribute scans of their work to the news archive. One of the things that we really need to do there is, we really needed to develop partnerships with a variety of libraries and archives to to secure access of copies for digitization. Now these are materials that where there are very few large collections of Catholic newspapers, where even libraries that can that collect them may have limited retention policies. They're really hidden not just hidden collections but they're really widely scattered collections as well and we've that's where it's really been particularly important for us to be able to work with with institutions like diocesan archives who hold so many of these scattered resources. And finally, the third thing is that we've really worked and develop great partnerships regarding governance. So, we've really been engaged not only within CRA but also engage in engaging scholars and our publishing partners in helping to make policy and strategic decisions strategic direction decisions for the archives. And these, these partnerships have also carried over into our funding. So, you know, we've done cooperative funding of pilot projects of contributing, we've done cooperative, cooperative funding through CRA for funding kind of ongoing some of the ongoing hosting costs, but also worked with our members and with other partners on securing grant funds to to launch to digitize additional content. So with that, I'll hand things over to Jean to discuss the research value of the collections within the archive. Thanks Paul. So we've listed on this slide some of the themes and more prominent names that that researchers have used the Catholic news archive to mine. And we even with our current corpus of 17 titles. We can really show change over time and Catholic reporting cap topics of interest to to Catholics nationwide, really from the 1830s, all the way into the 21st century. Although that's not any more additions that we can make that will add to the ability to turn up the Catholic perspective. So on this slide we've got, we've got images of Columbus monuments, European one and then on the right is Columbus behind a fence and it's actually a local statue that is under consideration for either contextualizing or possible removal or something like that. But Columbus is kind of a useful figure to highlight here because that's something that the Catholic news archive can do is give give access to thoughts on things like monuments and what themes were important. The archive turns up more than 2000 references to Christopher Columbus, and that shows the 19th century Catholic enthusiasm for the for Columbus as a Catholic hero. And, but there's also toward the later end of the whole archive, you see information about, you know, the controversies associated with Columbus. We've also got streams that document Indian schools, Native Americans, Catholicism among smaller groups, black Catholicism. So all of these things are things that we want to add to the collection in order to to get at some of these more perhaps niche communities. And with increased attention to diversity, equity, inclusion that will certainly shape the way that we, we seek titles to add to the collection going. But for now, we're, we're thinking about what, you know, from the national newspapers that are already included. And what kind of diversity can we present in terms of language like last. The early French language portions of some of the newspapers. And we're considering things like, can we highlight the one of the first black Catholic newspaper actually published in Detroit in the 1880s and 90s, the American Catholic Tribune, published by Daniel Rudd born a slave in Kentucky. And then we also have access to collections like the, the, the Catholic Sue Harold, which was also published in the 19th century by one of those. An Indian school and mission in South Dakota. So, these are the directions that will go in to increase the access to these, these kind of themes. We can go to the next slide, which is again a screenshot of the Catholic news archive showing our, our content for Columbus, Columbus on its own as a keyword pulls up everything from Ohio cities and other places and the Knights of Columbus, etc. But you'll note in the tiny text in the bottom corner we've got facets that show the, the coverage just in that portion of the screen 1839 we've got 63 references to Christopher Columbus so for certain topics this is going to be a really rich resource as we add to it, even more of a rich resource. You can go to the next slide, Paul, the Catholic news archive with all of the members and partners is proving already to be useful in managing our collections we do have a lot of access in and academic Catholic libraries included in our membership, and none, no one of us know, even coalition of us can digitize all of the relevant resources, but collectively, we're seeing that we can really leverage this for our own purposes and then for that greater good that Paul beginning, we are governed by members of the CRA and in consultation with scholars with all of the partners. Each institution is able to put forward for prioritization titles that they're interested in that titles that might be relevant to their local community. Scholars who we've convened from around the country, a lot of historians, unsurprisingly, have a great deal of interest in surfacing this kind of these kind of resources. And so there's a vibrant conversation about what things to include and how to go forward, and then libraries can rally around and archives as well to support the digitization of particular titles and to start with an eye toward digitizing the the quote unquote Vatican two years of particular newspapers because that is an area of great interest. It's true that these newspapers that we've selected are ones that are often not included in larger commercial collections, newspaper databases, or even in some of the efforts we've seen like chronically in America from Library of Congress. We're only a handful and only partial representation of Catholic newspapers. So we do feel like we're contributing to that larger open access material that's out there. We the digitization and digital preservation go hand in hand, as things are put forward for digitization and that's been by particular members seeking grants, but then orienting their their digitization efforts toward inclusion in the the Catholic News Archive. We've seen real success with that. And because the the standards for the platform are consistent, it gives everyone an ongoing access to to these resources. And we have been very happy to use this in a couple of instances where we, as a library we can provide financial support along with others to the digitization and the hosting example of that, where we have contributed potentially but the digitization, the quality control the hosting is done in a centralized way through the Catholic News Archive and that is a beautiful thing. We don't have to. In our, in our home institutions we don't have to be concerned about that we do it collectively. The image on this page is of the American newsstand. I don't have actual details about where this is but, and that's a bit of a gesture toward the kind of diversity we'd like to include in the future, where we would like to explore digitizing American Catholic newspapers, of which there were a robust number from the late 19th century into the early to mid 20th century. Pretty much an undiscovered or little use because it's larger film and also in German language, but a resource that could contribute to that larger greater good. Moving on to the next slide I believe Paul. All right, so I'm going to wrap up just very briefly with with with just some brief remarks about a couple of our future directions and then we should have a few minutes yet for questions. So, you know as much as far as we've come with the with the archive, you know there's of course there's always more to do. And, you know, the main thing I'd like to leave you with on this is that we're always trying to to make sure that we make this as useful to scholars as possible. And so there are a number of features that we're trying to do, you know, ranging from, you know, adding additional content to things like making it easier to do text mining or do both downloading of content from from the archive. One of the things that we'd really like to invite you both those of you who are in the audience today but also those of you who might be watching this after the fact to do is to give us some feedback on what might be particularly useful to you. I mean either in terms of content or in terms of functionality and so there's a survey link here that we'd we'd really appreciate it if you could give us some some input on. The other thing, and just to reiterate a point that Jean made in her in her remarks is that we are really very interested in expanding inclusion within the collection and making sure that the wide range of voices that are part of the Catholic community in North America are represented within the Catholic News Archives. So with that, our present that's our presentation and we'll open it for questions. Thank you Paul and Jean for that really interesting presentation on that wonderful resource. We appreciate you coming to see and I to talk to us about that. And thanks to our attendees for joining us here this afternoon if you're on the East Coast. We'll open up the floor now for questions or comments relating to this topic so please go ahead and type your questions now into the Q&A box and I'll be happy to share those with our presenters. And while we are waiting for folks to mull over what they've just heard. I'm just wondering I realized this resources, a North American resource. Are there any thoughts about going international with this. You know, I, I, there have not. I think that there's been some interest. So, you know, Jennifer younger, for example, as it has indicated there might be some interest in thinking about other, you know, really, we say North American but really what's in the archive is US And so I think that there's interest in looking at Canada and Mexico and the Caribbean for certainly beyond that. I'm not so sure. Okay, got it. And about how many newspapers are in it right now. Yeah, so right now it's 17 newspapers. And as I mentioned those are from, you know, those represents, you know, much of the geography of the US they rate they represent different time periods from, you know, the 19 early 19th century through the through the 20th century. These are national newspapers, the Catholic worker, for example, which are major socialist newspaper. And it looks like Jennifer has jumped in here too. Yes, I just turned on Jennifer's microphone. So, Jennifer I see you made a comment in the chat. But please feel free to share that comment with us if you'd like. I'll just read that aloud. And so Jennifer, if she wants to join in please do Jennifer writes. Yes, we know there's interest among French Chilean and other Latin American countries. Money is the only obstacle. Canada papers on the are on the agenda now. So, okay, so you were asking me to share that okay got it no problem. If you want to jump in please feel free to do so at any time. I do comment that the Catholic news service newsfeed, which is digitized and fully in the, in the Catholic news archive is interesting in that that includes, say, dispatches from Rome and, and the like so there's it did. It is a new service and so there's services in a way a bit of an index to national and also to a certain extent international Catholic news. So that's been a very interesting addition to the roster of newspapers. Also the Catholic news and pictures is is very popular and we've found uses for this with a number of different audiences of course researchers and college students are among the big users as far as I'm concerned and as far as I observe. But also with younger students we've had interest from high schools in the area around our institution and we've had some pretty good success with pushing it out to people, the more visual the better in some cases for for our younger researchers. Yeah, that's that's great, great to hear. We have a question coming in now from Nathan girth. Nathan asks, thirsty comments it's a great it's great to see these materials being captured with so many participating organizations can you talk about how you handle the challenges of governance. Sure. Yeah, so we have a number of several governance bodies within that work with the project. So overall, overall management of anything CRA happens at the board of that of that of the parent organization, but there's also a newspapers project committee that is part of of the specific the cna camera gene if you're on that. There's also a scholars committee that that work where we work with, you know, faculty and historians and such who might want to use that to get feedback from that perspective. And then there's also a group of the publishing partners that that we work with and really, when I say we, that's really the executive director doing a lot of that work. Thank you. And thanks Nathan for that question. We also have another comment from Jennifer relating back to the question from before. And she says 85% of use comes from the US. The remainder comes from the UK European countries African countries, Indonesia and the Philippines so that's, there's a significant amount of international interest in the tool. Really interesting. All right. Well I don't see any more questions coming in right now and we are actually at time so I'll go ahead and bring the public version, the public portion of this presentation to a close by stopping the recording but I'll invite our attendees who are still here. If you're interested in hanging around. We can unmute you. You can approach the podium and have a chat with our presenters, make comments, ask questions, as you like. So once again, thank you so much, Paul and Jean for coming to see and I and sharing your project with us. It was really a pleasure to hear about. And thank you to all of our attendees. Take care everyone. Thanks very much.


I am going to continue with using Linux tools. So, let me introduce our colleagues, there is Shrikan Patnaik here, who is also in the Fossey project and there is also Prashant the way here. So, they both also will help in the conducting of these sessions. So, our next topic called cut, which we will do for cut and paste is what Shrikan will continue. Before he starts, there is one particular point I would like to speak about that Shrikan can speak a little more about is about the editor to use. So, all these files were using for viewing, we saw the food or text, we saw one other file, these are all just text files. So, for all these batch scripting etcetera, we are going to write just plain text files. We are not going to open any editors, any fancy editors for that. So, I am not trying to say that only Microsoft Word is bad for this purpose. To write a plain file also open office Word is not the right editor, to write a just a plain file. So, let me give an example. So, let us see the screen, so we have this bar dot text, bar dot text is what we can see using less we said, this is some line, we can also cat bar dot text that information comes on the screen and as I said the prompt again comes at the end of after showing all this information on the screen. But this is some file that is not written using open office, it is not written using Microsoft Word, it is edited using a very simple editor. For example, so for those who have not used a very simple plain text editor, we would recommend that you just start with nano, nano bar dot text is a editor that nano editor itself default comes in all Linux systems. So, nano will open such an editor and then you can type whatever is required. So, this is how you can type various things, then at the bottom, at the bottom it says how do you write an exit etcetera, so control X for exit when it says now it will say do you want to save it, so we can again save it to the same file name and then now if you do cat bar dot text, we see that all this information we typed is also there on the screen. So, this simple editor is what we really want to encourage the use of, why because then people want to write something and send an email, then they write it in a doc file or a word using a word document, it is not essential for just plain text, it increases the overhead on everything. So, with that I would, so how to do cut paste copy of text files is what we will start seeing now. So, these are not cut paste using a mouse, this is not using how to do cut paste of documents that are written in word or doc, this is just plain text files, Srikant will continue now. Hello everyone, I am Srikant and I will take the session from now. So, now we will see some editing commands in Linux. So, you can see on the screen there is a cut command on the slide. So, it says that it allow you to view a certain section of lines. So, for example, we are taking here say ETC password, see you can see there is a slash is there, the slash means it is the root directory, after that we have ETC, ETC is a folder which contains the configuration files. So, in that case the file is password, you can see P A double S W T. So, what you will see we will just try to view the content of password file. So, for that you can use any editor for now to just view the files we are using cat. So, cat slash ETC slash pass and then I press tab to complete it automatically. So, you can see these are the output of cat command. So, it is very difficult to view the certain sections of the file like you can see there is an IITB return, X is written and you can see every field is separated by a column, see every field is separated by a column like thousand one thousand one IITB comma different things are there. So, what is our aim is to view only certain sections of the file like suppose we want only the first line of the file which contains the username. So, now with the help of cut command we will try to remove that other lines and just view the first line. In this case we have the first line as root you can see it is a root. So, may be it is not visible properly on your terminal output because we increase the font size. So, if you view on the normal terminal you will see the lines like this root colon X colon 0 colon like that. So, in the next command we will show how to just view the first column of the page the first column we have root second column we have X. So, we will call this as first field and this second that is X we call as second field. So, so on this is third fourth fifth like that and you can see each field is separated by a colon. So, if you go and type man cut you can see different options which cut provides. So, cut has different options as you can see like hyphen B hyphen C hyphen B is to select the number of bytes that we would not see now you can explore by your own. So, what we are interested is we are interested in hyphen D it says it is a delimiter instead of tab field delimiter. So, by default if you do not provide hyphen D option the cut command will separate the file using the tab space, but we do not want in our case because in our case we have to tell the cut command that we are having a file which contains the colon instead of tab. So, in the command now I will show you command to exit the terminal from the man mode man just type Q. So, to clear you know that control L it will clear the screen. Now just type the command cut hyphen D. So, first field we want only the username first field give the colon as a delimiter hyphen F we will see what is hyphen F first is the field number then slash ETC slash password. So, before entering I want to say that what are these different commands. So, as I already told cut is a command which will use to cut a certain field in the file hyphen D is the delimiter. So, we are forcing the file forcing the command to parse on colon and hyphen F is the field. So, which field we want we want first field as you can see first field is the root that is a username enter. So, now instead of that big file with different colons and different numbers you are getting only the names and this is what we want you can see all the names are listed like root, daemon, bin, these all are username names in Unix.  So, if you give instead of hyphen F 1 you just give 2 you will get the second field in our case the second field is X you can see the output as X only. So, I think cut command is pretty clear to you. So, on the slide also you can see the hyphen D specified delimiter between fields default is tab. So, if you do not give anything it will consider it as a tab hyphen F specify the field number. So, suppose we will see some advance cut options. So, instead of only one field let us give many fields. So, let us give one first field now we want some other content suppose we want the date for example or 7. See I am not giving these numbers randomly it based on our requirement like first field is our root that is username. So, you count start counting from the first field. So, fifth field would be this would be second third fourth fifth fifth will be the again the username then seventh will be this path of the username. So, by providing cut hyphen D colon means separate these each field only we use with the colon separation then hyphen F force the field for first fifth and seventh hit enter. So, now you can see. So, these are the different fields which we got now. So, I think cut is very important and very useful throughout your unique session and we will see some advance use of cut commands later. Now, cut also allows you to choose the characters and bytes as we seen in the man cut. So, it shows that hyphen B is the option for select using the bytes. So, if you want to cut only certain characters say character number 1 to 4 that is first 4 characters you can use this command cut hyphen C 1 to 4 slash etc slash instead of slash etc slash password you can choose any file you want. So, I am not showing this command on the terminal this you can easily do it yourself. So, there are some commands like sensible default are assumed in such cases. So, this is important this you can see on the terminal. So, suppose cut hyphen C and up to 4 I will explain you shortly what is this slash etc slash password. This means we want characters up to 4 that is starting from 1 2 3 4 starting from 1 2 4 these characters we want. So, that is it. So, we are getting the first 4 characters of the file password. Suppose, we want characters from 10 onwards as you can see on your slide it is 10 onwards. So, suppose let us change it or say let us have from 6 onwards whatever characters in the file starting from 6th character to end of the file end of the line. So, you can see. So, after 6th character we are getting whatever left. So, what we have learnt is to how to get certain fields and certain characters from the file. Now definitely we want to process those things and we want to paste those things in certain other output files. So, this is an example. So, these example files are present in your model you can download as example test underscore examples there is an folder I have uploaded. So, there you will find all these files student dot txt marks dot txt you can download them and you can practice them. So, what it does I will show you an example. So, it joins the corresponding lines from two different files. Suppose, this is the command paste students dot txt and marks dot txt. So, first I will show you what is there in student dot txt and what is there in marks dot txt. So, let us see where we are by using pwd. So, we are in the desktop and ult. So, let us go to examples cd examples. So, we have here different sh files and different files. So, here you can see we have a student dot txt and marks dot txt. So, how to view those files you can view using cat command cat student dot txt. So, it contains name of the students like Hussein, Dilbert and and similarly you can view the content of marks dot txt. So, it contains the marks of different students. So, what our paste command is does to view the different option of paste commands let us try man paste. So, it will show you the different options of paste command that is again you can specify the delimiters serial help version you can explore this. So, coming back to a command our command is paste student dot student dot txt and marks dot txt fine. So, without using any external word editor or any any external graphical user tool we have just concatenated two different files into one file, but we have not written this output in a file that will show later that how to send this output that is Hussein and his marks Raoul and his marks all this to a file that we will see very shortly. So, but with the paste command you can combine the output of two files and you can make a new file. So, to do this in your graphical user interface you need some tools like you have to open either word pad or notepad then you have to copy paste manually. See there is an option in the man page of the paste command which has hyphen s. So, hyphen s will do it will print the content one below the another like now we have the output like Hussein has a name in the same line sorry Hussein's marks are in the same line suppose you want the marks to be printed in the below the names. So, you can use the command so that you can try your own. So, there is a small exercise you can do now. So, not now you can do it later. So, just read through this first column of marks file had a roll number how do you get a combined file with the same output as above try this and discuss it on modal forms now we come to the shell. So, this is a very important topic. So, output of cut hyphen d before coming to this command let me tell you what is piping and what is redirection is of course, this is in the next slide. So, you can just come to the slide number 38. So, the redirection tells you that whatever the standard output that means whatever terminal we are using that is a standard output. So, the standard output is redirected to some certain files file number which you give file name which you give. So, as you on the screen suppose you have the paste student dot txt marks dot txt gave you the combination of two files and now you are interested in this output you have already done the formatting and you want this in the some file. So, for that you need a redirection you want to redirect the terminal output to some certain file. So, that is what redirection means. So, for redirection you can use the greater than greater than symbol give the command and give the file name. So, this greater than will create a new file at specific location that location also you can specify. So, without previous command let us give paste student dot txt and marks dot txt use the arrow and create a file say result dot txt for example, we need a file result dot txt. So, it has created result dot txt. So, you want to see where it is just type ls to view the files. So, here it is you can see result dot txt previously not there it is now created and you want to see the content of result dot txt just cat it using cat command here it is. So, whatever was there on the terminal is redirected to a file this is very helpful coming back to the previous slide. So, here is an example. So, we have another file known as marks one dot txt let me show you the content of marks one dot txt for that just type cat marks one dot txt. So, this is the content of marks one dot txt. So, let me switch to the chat I think there is an important question how to separates in field fields in the file if delimiter is space just give space as a delimiter in double in double quotes just give the space as a delimiter default is tab. So, instead of call done you can give space that is in single quotes you can provide a space double quotes sorry coming back to the slides. So, this is an example with marks one dot txt you can see the content of marks one dot txt it contains four columns. So, what we can do is just try this example. So, let us try cut hyphen d. So, your question will be answered here give space as a delimiter because as you can recall in password file the delimiter was call done, but here the delimiter should be space because the fields that means the numbers are separated with space not call done. So, instead of call done we are giving a space now. So, use the cut command cut hyphen d give space which field we want suppose we want second field to end of the file say marks one dot txt. And on the slide you can see a backward slash. So, this means that there is a continuation after this command also means this is in complete a line from cut hyphen d to m underscore temp dot txt it is complete single command, but it is unable to fit in the slide. So, this slash gives the terminal an option to continue from there itself. So, after marks one dot txt it will come to the greater than symbol that is redirection. So, here we do not have any problem. So, no need to give that. So, now we can go to temp we can create any file. So, here temp we have created m underscore temp. So, again I create the same file m underscore temp dot txt. So, file is created. So, whatever so what this command do? So, it takes the delimiter as space delimiter as a space gives the field number two onwards two is the second field that is this one eighty nine onwards till end of the field because there is an hyphen after two. So, marks one dot txt. So, whatever the output comes so the expected output is eighty nine ninety two eighty eighty five ninety eight forty seven sixty seven. So, this should be there in the output file. So, how to view the output file just cat slash temp slash m underscore txt. So, this is the expected output. So, similarly you can practice the other commands. So, they are very similar to this. So, now we come to the piping. So, piping means we want the output of previous command as an input of second command. In many cases what happened? We want something to be gathered from the output of previous command which should be used in the next command. So, in many cases we will see like this example cut hyphen d space as a delimiter marks one dot txt that we are piping to paste. That means whatever the output this cut command gives that goes to the paste command and where it goes it goes to the second field. So, you can see there is an hyphen here. So, when we execute this command you can easily understand. So, you can So, let us see this command first cut hyphen d gives space as a delimiter. So, now use pipe to paste hyphen d space as a delimiter and student dot txt hyphen. So, as you know paste command takes two arguments. You have seen in the previous example where we have done paste command. We are using the paste command. We have concatenated two fields from each file. So, the first field will come from student dot txt and the second field will come from cut command because we are using a pipe. Pipe will provide terminal to get the output from cut command and redirect that output to the second field of paste command. So, you can see you got the output and now if you want to redirect this output to a file you can just use a greater than and give the file name. So, it will redirect to the next command. Coming back to redirection again similarly there are some standard inputs can be redirected like some suppose you have a command in a file and that command you want to use now. So, if the command is written in file you can again get it back by the less than symbol that is less than arrow and you can use that command. So, input and output redirection could be combined also. So, this you can try as an example or an exercise and try this at your place and please discuss on model forums. So, this is very simple nothing to be fair about. So, in our previous case what we did we just created a file like we just output the cut commands output to the paste command and now we want to output to be redirected to a file and from the same file we want that input also that can be done very easily and just see that file. So, this example shows the standard error. So, in Unix terminology we have different output numbers for different outputs like standard input sorry standard outputs is named as 1 greater than if you gives the 1 greater than symbol that means we want a standard output from the terminal. So, it redirects standard output. So, whenever we say standard output we say terminal output. So, you can see this is the standard output whatever you on the terminal it is a standard output. So, in many cases what we want we do not want the output of a certain command we want the complete output of the terminal suppose this is the complete output of the terminal ls. So, what we want we want this complete output of the terminal to be redirected in some file. So, instead of writing that we can directly write 1 greater than 1 greater than we will easily assume that it will assume that you want the output from standard output 2 greater than redirects the standard error. So, if some error is there in the output. So, it will redirect the error suppose instead of ls command I type l a or suppose l a s. So, it is an error ok. So, this error can be redirected to a certain file ok. So, how you will redirect just redirect using the 2 greater than command to a file. So, it will redirect to a error file. So, this you can try also as an example yeah please if you please ask us any doubt if you have. We have a question from Saint Joseph Kerala. Can you please give some more examples regarding standard output and standard errors. Standard errors this standard error is not a priority yeah. We will certainly need to know standard input and standard output ok. So, let us yeah we will see some more examples yeah. Thank you for your question we will see that we will just see what other questions are there ok. Thank you any other question did you have. Basically what is the difference between redirection and piping. Ah ok that also we will see in more detail yeah ok. Any other question did you have. No sir. Ok ok sure ok. Let us now see a question in Don Bosco, Guwahati please ask. Yes sir going back to the slide number 41 in the piping part. Yeah. So, at the last of the command here we have typed a hyphen. So, what is the use of a hyphen? Hyphen yeah. So, after students.txt there is a hyphen there. Yeah. If I do not give the hyphen I do not get the output. Yeah yeah hyphen role of hyphen is a little difficult topic we will see in more detail yeah. Thank you for your question. We are now connected to VP College of Engineering Baramati please ask. So, my question is while using this space space command. Hello. Yeah. Yeah. While using this space command. So, in one of the file marks are there and with the role numbers in one of the file their names are there. Then I want I want role number first then name of the student and then remaining contents that is marks. So, what I can do for this. You want to interchange the sequence of the columns. Yeah yeah same thing that I want to do. Ok ok sure we will see that we will see that yeah. Now we are connected to Shastra University, Tanjavur yeah please ask your question now. So, will the cut command work only in the current directory will it not work in other directory. Cut, cut command. No cut command will work for files in any directory. The file name has to be specified with the full directory path if that file is not in the current directory yeah, but it will take files from any directory. So, there are some questions on chat. Yeah. Yeah. So, whether the cut command will work in the current directory or any other directory also. So, that we will see on the computer yeah. So, let me just quickly recap the questions. One of the questions was we want to see more examples of standard input and standard output. Then we want to see the exact difference between pipe and redirect. Then we want to also come to the question about where the document was created in certain directory. That we will see now and exactly the role of hyphen in the usage of paste and how to use paste for interchanging the sequence of commands, sequence of columns inside a file yeah. So, let us go back to this. So, we have students dot text yeah this is a list of names of students. We have some big file marks yeah. So, let us look at this marks. Let us also see what other file we have yeah. This has only three columns. So, let us quickly put some more names into this. Suppose these are the names of the various people yeah. So, cat marks yeah. So, now the first question is how do we use the cut okay. Now cat marks dot text suppose this marks dot text is being catted it is being shown on the screen yeah. Instead of it being shown on the screen we want it to be used by another command yeah. We want the output of the cat command instead of going it going on the standard output. What is the standard output? Standard output is always the screen, standard input is always the keyboard yeah. Standard input means what there are certain commands that require you to type something. For example, the editor. You once you open an editor command then you are supposed to start typing in things into the editor using the keyboard. So, standard input will always be the keyboard. Now whenever you want to see the output of some command the output will come where default it will be standard output yeah. So, standard output means s t d o u t the standard output is always the screen that is a cat command cat marks dot t x t has shown the output to the screen. Now we want the output to get utilized by another command yeah. We want it to get utilized as a file for another command that takes its arguments as files that is the pipe command yeah. So, now cat marks dot t x t is what we can pipe through a pipe we send to another command. So, can you now suggest a example of a command that takes a file name as its argument yeah. For example, l s yeah l s minus l of a file name will so no l s l s takes l s will sorry not l s yeah that is that is my friend Prasan theory suggesting that we can do l s instead of catting this yeah sure.  Now from this we want to extract out some information what information do we want to extract out we want to get only grep grep has not been taught. See there have been some questions about asking for examples of standard input standard output pipe redirect. So, even these examples it is hard to think of examples from what has been taught to you so far yeah. If we can think of any examples that is not difficult, but if we are asked to think of examples to depend only on what has been taught to you so far that is making things a little difficult I hope you will acknowledge this as well as teachers at various if you are asked to give examples of things we only from the things we have taught that is a little harder. So, now since grep is one thing we will anyway teach you why do not we quickly see grep yeah. So, what does this grep do? So, let me just tell the very simple usage of grep yeah. So, there is this cat marks dot txt in what am I teaching now in order to understand pipe redirect and all those cut paste related things we are now first going to learn grep grep anyway we are planning to learn. So, we will do it now only. So, cat marks dot txt has 1 2 3 4 5 5 lines now we want to suppose see which line has some very specific pattern yeah. So, grep is a command to look for pattern in file how does grep work it looks for a certain pattern inside a file this is how you will use you will type the pattern and then you will find you will type the file name inside which you want to look for this pattern then it will spit out all the lines which have that pattern suppose now we are looking for name 3 pattern inside which file inside marks file yeah. So, this now has looked for the name 3 pattern inside the marks dot txt file and it has shown on the standard output only that particular line which has that pattern name 3 yeah. So, usage of grep is that clear? So, grep pattern let me repeat file name yeah this how one is of course if I press enter it will say that file name file is not there yeah this is just an example grep name let us say name 2 and marks dot txt was the file we are looking for yeah. So, it has given us only that particular line which has this pattern called name 2 of course it does not have to be only names it could also be let us look at whole has 47 any line that has 47 as a pattern it will get shown it does not have to be a whole word you can look for only the character 7 yeah and recent Linux versions recent meaning since several years will also show that particular pattern that has been found in a different color very helpful for us this is how grep works grep pattern file name. So, how what does grep do grep command takes a pattern of course pattern has to be given otherwise what will it search for file of course file has to be given there are no options here yeah now what we can also do. So, what my friend Prashant was telling us to L s minus L now this is why we wanted a smaller L s minus L has shown all this information now from this perhaps we are interested in looking at which all lines have character 18 yeah there is this character called 18 we are looking for only those lines which have 18 character somewhere in that line. So, line by line it will search for that pattern and it will spit out on the screen yeah what will get spit out from the output that has come out we want to extract out only those lines which have the character 18. So, what output do we expect we expect this line we expect this line also we expect the last two lines also yeah why do not we choose another character where we expect only 1 2 1 2 yeah look at this if you put 7 7 4 4 then we expect only the last line to come as an output yeah. So, why do not we try that. So, L s minus L instead of that output coming on the screen we will send it through pipe we will kind of filter it yeah we will give the output of L s minus L which would default it would have come on the standard output we will pipe it through to which command called grep and now grep of course has to be told what pattern to find does it have to be told to look for 7 7 4 4 pattern inside which file does it have to be told that no why because that particular file is being piped through yeah. So, now what grep has done grep is not going to take an output file it will not take a file name as its argument why because that is being piped the information that it is supposed to look through in from a file is being provided to it through a pipe that is how we will use the word pipe. Pipe means what somebody wants to eat food instead of giving food into the mouth we will send a big pipe and send the information from end of other end of the pipe and directly send the information into the mouth through the pipe I think that is how the word pipe is used yeah somebody let me repeat this extremely important usage of pipe as soon as you use pipe this I should say in Linux and Unix this is the best thing in Linux yeah the pipe is the best invention whoever thought of it would have certainly have you would have had the gates of heaven open for him yeah all others who could not think of pipe cannot go in. So, let me repeat L s minus L is some output that default goes to the standard output yeah, but instead of it going to the standard output we want it to get utilized. Utilized now as a file as a file that is an argument for another command yeah which command for example we are doing grep. Now grep how does grep work grep takes a pattern and it requires a file it requires only one file please note there is no hyphen we are using here because only one file has to be specified to grep yeah the default for the default for the default grep to work only one file is required that is compulsory there is no option. So, grep instead of now specifying the file that information which it is supposed to take from the file is now being provided through pipe. So, when you do this that output is sent through a pipe for the grep command yeah this is as well as pipe is concerned this is different from redirect why what where is redirect now. So, this you might have you might not even have decided what all to do yeah this L s there might be some really big difficult program that is generating lot of output which you do not want to generate again you want to save the output from the screen into some file yeah if you want to do that then you can redirect it to a file file output instead of standard output S T O U T sorry let me make the font larger. So, L s minus L if you are not typed anything after that it would have come on the screen instead of it coming on the screen we have put a greater than sign greater than sign means like arrow redirect it will go and get copied onto this file what file we have to choose the name now yeah you cannot you cannot skip this part file name has to be typed. So, one file has got created and nothing has come to the standard output now why do not we see what is there in the file how to how to see that just do cat yeah. So, what is come here is exactly the output that would have come if you are not redirected it. So, this is the output yeah it has got redirected into the file notice that the file also has got created already yeah while you are doing L s minus L as soon as you gave the pipe into that that file also has got listed surprising you are you are creating that file to redirected and the file is already got created that is how Linux works some small technicality do not need to worry about it now. So, this explains very clearly the difference between pipe and redirect now what about standard input what if some particular file requires some input and that you wanted to come from a from a file that is when you will use the less than sign yeah. So, when you start typing an email for example, and then as soon as you open the emailer inside the terminal then you are supposed to start typing the message that message if you wanted to come from a file then you will use the other symbol less than we saw pipe greater than less than yeah pipe is just for sending the output is from standard output into a to another command yeah that is different from sending the output to a file for sending output to a file you will use the redirect command. So, standard output going to a file use redirect which means greater than sign. So, what we have not yet discussed is the hyphen. So, what is hyphen now? So, now let us see yeah. So, let us see cat marks dot txt yeah now let us cut with minus with the delimiter space yeah and first column yeah how do you say minus f minus f minus f 1 oh sorry I have to I have to specify the file name cut yeah this is perhaps the mistake that was done in a particular person who explained about the document I forgot to type the space and I was corrected here that the space is required yeah, but at the end of this finally, we have to specify the file yeah what does this cut do cut cut and remove only a specific column from a file yeah that much is required you cannot you cannot skip that part file has to be specified if you do not want the default delimiter of course, you can do minus d as an option and specify different delimiter yeah, but the file itself has to be specified let us specify marks 1 dot text again. So, now what this has done it marks 1 dot txt sorry has all these different different columns we want only the first column how did we specify first column we specified by minus f 1 yeah and then the file name itself. So, cut is the command that takes only one input now we might want that this first column comes to the last yeah that is one of the question that how do you use space to interchange the columns that is one thing we will see now, but then in any case what perhaps one particular person had forgotten was that file itself has to be specified to cut yeah cut has to be told that it has to remove and give only the first output first column to the standard output, but from which file to take that has to be specified you can also specify not just first column first and third column let us say yeah this will see notice let me type this again this was the original file from which we are showing only the first and third columns. Now, we might want that suppose we want only we there is a possibility that we want only the names yeah and we know that names is the last column last column in this case fourth column sorry sorry we wrote a new one. So, suppose we are doing so the fourth column has only the names of this particular file which file must not text and it gives only the fourth one so there is one way of removing only the names and from this suppose we want only one particular name yeah so we might redirect this to grep name four may be this names have actually name first name surname and we are looking for the full name of a person only the surname we know yeah so that is an example where we might require to do this. So, then grep four grep only the pattern four yeah please note that we are specifying only the pattern here it could occur anywhere inside that line so it has given only name e four. So, let us consider the problem of taking marks dot text taking the last column and putting it as the first column first column also. So, how do how would we do that one way to do this is I hope the problem is clear yeah we have fished out all the names and we can redirect this to a file called just names yeah. So, what is this file newly created file has just the names now we might we might say I do not know let us go back to that marks one dot t extend put the names back paste minus d put the minus paste minus d put the delimiter space then marks. So, please note the mark paste command needs two arguments two file names yeah so paste marks one dot txt and just names if you do that it will show the output on the screen yeah now what did we do from marks dot txt we extracted out the names that we copied to a file called just names and then we pasted file one file two now did is was it really required that this intermediate file you create only for this purpose. So, why do not we remove this redirect and now you spaced yeah and now what is the first file now you see paste requires two files it compulsorily requires two files of which only one is being provided by the pipe yeah now first of all you have to specify another file second if there are two files you have to specify one is coming through the pipe already. So, the one that is coming through the pipe is the first file or second file now yeah very clearly if you interchange the sequence of files the pasting will also interchange the pasting will happen either earlier or later depending on the sequence of files you specify as arguments to the paste command. Now, your specific file one file two yeah among these two let me increases font size so, this paste requires two output file two files as arguments of which one of them is coming through the pipe which one is coming through the pipe that one is where you will put the hyphen and the other one you will genuinely specify the exact marks one dot txt yeah if you do this then it will do that is when that just names role is not required now that is being provide through the pipe yeah. So, let me repeat if you are using after the pipe a particular argument that compulsorily requires two file names as arguments then when you are sending some one of the file information through pipe you have to specify whether this particular information should be taken as a first file argument or second yeah if this information is not provided then paste will not know it will not know whether the output that is coming through the pipe is it the first file or second file there is genuinely a big ambiguity if you if that hyphen were not provided yeah. So, notice now that we can also put the hyphen here now it will hyphen the whatever is coming through the pipe is playing the role of the first file. So, this is how it is so, after we have understood the role of the hyphen now we are in a position to thank you now we are in a position to learn how to interchange the columns in a in a file yeah. So, how do we do that so, let us suppose the problem is that let us get marks dot yeah so, this is marks dot txt file and now we are interested in we do not like the names to be in the last column we want the names to be in the first column. So, if you want the names to be in the first column we are going to cut the last column and then paste well I think use two pipes I am not sure if that is possible so, let us do like this yeah if you do this then here it has taken the last column and also put it as a first column yeah. Now, the next question is you can get rid of a particular column yeah this is also something you can do easily how you just pipe it again you cut minus d again the delimiter space now you want which only the first, second, third and fourth yeah. This way now we have just got rid of the fifth one of course what we can also do is we can use dash for all the column from first to up to fourth yeah. So, somebody's question about how to interchange I have not really directly taught how to interchange what I have told is whatever you want to remove just cut and remove it and you paste it to whatever position you want after you have pasted it to whatever position you want you again pipe the output to cut command and remove one that you have duplicated yeah. Does this answer the question about how to interchange the columns perhaps paste can be used paste can be used with multiple file names also more than two also two are at least two are required if there are three or four then that will also allow you to put information in not just interchange columns, but have more flexibility in rearranging the columns. So, this answers most of the doubts this answer is the difference between pipe and redirect the information comes from standard input for that we require to see another command that time we will see this I use the example of I only use the example of e-mailer man paste and man cut is the ideal thing because cut and paste have capabilities much more than what we are covering now. Let us go back to the slides now we have seen pipe. So, as I said that we took an example where we created a intermediate file that intermediate file anyway has to be removed eventually that is when this pipe is going to play a very useful role tab completion I have already explained. So, it is strongly recommend that you use tab to autocomplete that ensures that no typos occur in the typing of names etcetera only in case of an ambiguity you have to resolve by typing a few extra characters. So, bash provides tab completion not just for file names and directory names, but also for commands themselves also for host names, variable names, variable names we are yet to cover the only variable we saw was dollar home, but there are many more variables which we will see in more detail today history. So, you would have seen you would have noticed that I was using the up arrow mark key for navigating through past commands. So, but then if the command that you typed was very much far in the past then you would have to use up arrow mark key again and again is there is you have to you can just search through all the typed commands all the commands in the bash history. So, for example, I had used a command called v i. So, I can do control r v i as well as the press v it looks for all the past commands with the v character anywhere in that command not necessarily the first one then you can make it more and more defined by typing more after we see whether it has found the command that we are looking for or not. So, we only saw that we do not want a space in the name of a file or the name of a directory why because the space is very crucial for separating command from argument command from option one argument from another argument. So, we have some more such characters which we do not allow these are all called meta characters. We already saw pipe is a meta character pipe has a very important means slash itself separates directories from sub from its sub directories exclamation mark also has some important role quote single quote single open quote single close quote both have really different meanings double quote of course there is only one semicolon these are all what we will call meta characters very important meta character is a star star means everything all possible completions all possible characters that can remain here except empty character. So, the star should be at least one character. So, we will go back to this and see an example let us see LS. So, there are so many files there are some txt files some dot sh files. So, now let us see only the txt files LS star dot txt will show us all those names where star had at least one character. So, whatever just names this is just LS just underscore names does not have dot txt anywhere that is why just names did not figure out in LS star dot txt. So, the star can be used inside something also for example, you might say LS m star x t. So, it says marks one dot txt and marks dot txt are the only two, but please note star cannot be the empty character. Now, let us go back to the slides another important command is sort sort is to sort the output. So, you can use sort again sort is a command that takes a file name as an argument you can use sort file and the output of sort will just default come to the screen which is the standard output instead of taking its input from a file you can get sort to take its input from a pipe. If a command is taking its input from a file only then you can use pipe to give the input to that to that command. If the input is required to come from the keyboard that is when you will use the less than sign which was the opposite of redirect. So, sort is a command that you can see in more detail it will just sort you might also choose to say sort numerically sort based on numerical value especially for file sizes we might want to sort not just based on the location of the character we might also want to sort based on the fourth fifth sixth column based on a particular field. So, please see help sort minus h to see more advanced options minus case specific which field to use for the sorting purpose and for numerical value based sorting are also for reversing the sort of course the output if we do not want it to come on the standard output you can make the output to go to a file using the redirect symbol. Crap I have already explained because we needed to see in more detail hyphen and pipe. So, what is this slash has the slash been explained? So, when we are typing a command on the on the prompt then it is possible that you run out of space and you want to still type that is when you will use the slash and then when you use the slash then the batch script then the batch shell knows that you are yet to type more and then it will wait for you to type in the next line and you do this and then at the end of this when you press enter it will execute them all together. So, hyphen we have already seen grep we have seen. So, grep is case sensitive by default if you want grep to search for the pattern by ignoring the case then please use minus i very important while using grep is to invert the search. Instead of only showing those lines this is what we saw the default grep shows the lines where it found that pattern, but you might want to show all other lines except those lines which have that pattern in other words to reverse the search to invert the search. So, we for inverting the search tr is an extremely useful command that is that is for translating tr for translating certain characters to certain other characters. For example, when we transfer files from windows to linux in windows it turns out that file names are case insensitive. So, whether the same file is written in capital or small windows will not make a distinction, but in linux they are separate files. So, if you have written a script in which you expect that the file names are all in small, but you copy all these files from windows to linux that is when you will see suddenly the script is not working because it is looking for small case letter file names and all these files are actually having capitals. That is when you might very crucially require to rename plenty of files into new files all capital to small or may be small to capital tr is extremely useful in that case. So, tr is one example of what reads from the standard input writes on to the standard output. So, there are some more advanced things for tr if we require it only then we will see it again the rest of today's and tomorrow's session does not require tr unique. Unique if you put the UE words there then unique just means that if there are multiple occurrences of something then it will give a unique one. So, unique just removes duplicates removes multiple occurrences only if they occur next to each other. Please note that if there are two lines that are repeated in a file, but if those two lines are not next to each other then unique will not remove one of them. Unique will remove only next to each other only consecutive duplicated lines. You might also want to see only the ones that are duplicated or only the ones that are not duplicated. These options are also possible with unique. As I said that if you are concerned that unique should also remove lines that are duplicated but which are not consecutive. So, if you want unique to remove duplications even when they are not consecutive lines that is when we can prefer we can choose to first sort those lines and once you have sorted then these duplications even if they are not next to each other they will always come together once you use the sort command and you can out you can pipe the output of the sort to the unique command. That way duplications will be removed even if they are occurring separately if they are not occurring consecutively in the items dot text file. Now, we have come to a very important stage called shell scripts. Till now what we had been doing is we are just typing the commands onto the screen onto the prompt and we are executing them seeing the output output was being shown on the screen. If it was not required to be on the screen we were again executing this and redirecting it to a file. But then the purpose of as I said the purpose of the prompt the purpose of the shell is when you want to automate various things when you want to repeatedly do when you want to repeatedly do something that is when you consider it very useful to type all these commands into one file and then just execute that file. If you expect that whenever somebody gives you the marks of all the students the same set of operations have to be done again that name has to be shifted from the last column to the first column. If this has to be done if this has to be done repeatedly each time are we going to write the same command? No, what we will do? We will write all these repeatedly occurring commands into one file save it and keep and then just execute that file again again. This is where we require how to script how to write a shell script. So, all the commands that we need to execute we will write into a file using an editor. This is where we require to know what editor to use. So, we have just begun seeing the nano editor. So, let us take an example. So, these are the commands that we can choose to type on the screen. Instead of typing on the on the screen meaning on the prompt instead of typing on the prompt we can write all this into one file called test.sh. Let us see what file name has been recommended for this example. I would recommend that you go through the slides carefully write them onto the same file. Save the script as results.sh results.sh because this is a bash shell script. The extension has been recommended extension is .sh. Let me tell you let me repeat the extension is only a very good convention bash will still work even if it is not .sh file you can still execute it for the same performance. So, when you are writing a bash script is very useful very important very important to tell that this is a bash script. Why? Because that information is not necessarily contained in the extension. So, the first line is always hash exclamation mark bin hash with these slashes. So, this tells that whatever comes after this is a bash script. Let us see this let us see an example. Here we have 55.sh. So, some there is one command long list of commands one piped into an output of one piped to another all written in a bash script. So, let us see file 55 to .sh. 55 corresponds to the slide number here that is why luckily the correct one. So, it says this bash b b stands for born a for again. There was first one sh just a shell then this is how Linux has evolved Linux and Unix both have bash shell. So, born shell was the name that was improved to born again that that is a full form of bash. There was the first shell was just a sh just shell. Now, if we move this 55.sh to not not move let us copy it test.sh.pdf. Now, let us see file test.pdf. It still says it is not a pdf file it is still saying that this is a born again shell script executable. Now, let us try to change its mode. How do we change the mode? We will remove the execute permission and again check. It is still continuous to executable. Now, what we will do? We will see this test.nano. So, now we will just remove this. I should tell you why I am doing this in so much detail because hash is also write function. Unfortunately, I have by changing the mode I have given only read permission to myself. I have forgotten to give read and write permission to myself because of that it is not allowing me to save this. So, why do not we change mode and give 6 0 0 to this file? Now, you can do you can try this yourself by just by just 4 0 0 it gives only read permission. This is the part we had skipped, but then now there is read and write permission both to only the owner that is to this user that is me. Now, it will allow us to make whatever changes we want. Now, we will save this it has allowed us to save now. Now, when we do file test.pdf this script no longer knows that this is supposed to be a batch script. So, notice that we have removed the first line and suddenly the file command considers this file to have only ASCII text. It no longer knows that this is a batch script. What you can do after today's lecture? Check by executing give the execute permission to this file. Right now, it has only read and write permission does not have the execute permission. Learn how to give execute permission, give execute permission remove the first line in any case the line that we just now removed and still try executing it. Perhaps it executes and does the same job whether you have the first line or not it performs and executes and performs the same job. In that sense in that case what is the significance of that first line the hash this is something we can discuss at a later point after you have tried this. This other question on chat is about after copying using paste and redirection how will we save the file? So, when you do the greater than sign it already creates a file with that output instead of the output going to the standard output the output has gone and into that file the file has already got created that is the answer to this particular question about after copying using paste and redirection how we will save the file. The file has already got created instead of the output coming on the screen on to the standard output it has got redirected to the file to the file name that is specified. So, we will stop now please have your lunch we will meet immediately after lunch. Thank you very much.


follow camera working. Let's identify some of the issues that we were talking about in the previous video and look at how we can visualize those issues and talk about some of the ways in which we can resolve those particular issues. Okay, so let's jump over into Unity and get started. Okay, so let's take a look at a couple other ways we can smooth out the camera and not use the Vector3.Lirp. Vector3.Lirp is great, but it does have some problems when you're dealing with cameras like this. Okay, so what we want to do is we first want to just visualize what the problem is, and I like to do that with the debug.drawray method. So let's go back over here into MonoDevelop and what I want to do is I want to visualize the distance behind the character and it's the character's forward. So let's first get a debug.drawray and what I want to do is draw a ray from the target's position to the target's forward but negative so we get the back direction. And we're going to color that one red. Okay, and then I want to do another debug.drawray. All right, and what I need to do, actually before we do that, what I need to do is I need to smooth out another vector. Okay, so let's just do a private Vector3 debug distance. How about that? And for this, what I'm going to do is say that debug distance is equal to Vector3.Lirp. Okay, and it's going to be debug distance and we want to do the, whoops, sorry, it's debug distance. That shouldn't have done that. So target.forward so we get the back and we'll color this one .green. Okay, so let's actually then debug.drawray that particular vector. Sorry, I just made a total mistake there. So this is the Lirp. So I want to do a time .deltaTime times the M smooth speed that we're currently using. Okay, and then we want to do the color for that. So we're going to color this one green and we want to go from the target position to this new debug distance. All right, there we go, we made it through. Okay, so let's take a look at that and you'll see right off the bat when I hit play what the actual issue is as we rotate the character around. All right, so now we have our two vectors here. And if I turn off the ground, this will be a lot easier to see here. So what I'm going to do is I'm going to start to rotate this. And you'll notice that the green line, the ray, isn't maintaining its distance. All right, it's just trying to catch up to the position and it's finding the shortest path to that end position or to that target position, which is at the end of the red ray or red line. Okay, and we want to solve that. So one way we can solve that right off the bat is to do a Slurp. All right, so and that's vector three dot Slurp. There we go. All right, so if we were to actually check out the documentation on this, you notice that it's spherically interpolates between two vectors.  But let's take a look and see what that does. Okay, so let me turn off the ground again so we can see our rays that we're drawing. Okay, and there you go. Actually, we are maintaining that distance. Uh-oh, but you'll notice now we're getting some weird errors. And if we actually were to look at it, it is actually growing, but it is maintaining that distance pretty well. So it's a it's a better solution than actually using the LURP in this case for this particular situation. All right, so then let's take a look at one more before we close out this. So I'm going to do a smooth damp. So vector three dot smooth damp. Now for this, I do actually need another variable. So I need a public or a private vector three. I'm just going to call this a ref velocity. Okay, so if we were to actually check out the documentation for this, you'll notice that, whoops, let's do the vector three dot smooth damp. That we need to provide a ref variable because it's going to output the velocity into this particular ref variable. So that's why we create this extra variable for this. And in here what we want to do is say ref ref velocity. And then we don't need the time to delta time because this just uses a value, a certain amount of time that it needs to catch up to that particular position, the debug distance or the forward sorry. Okay, so let's jump back into unity here and let's check this out. Okay, so you notice how slow it's taken to get to that position. So what we need to do, this is the opposite of the lerp or the slurp, we need to do something like point two. And now it'll maintain its speed, but you'll notice that we're getting that same problem. It's just taking a linear path or shortest path to its target. So that's not going to work for us either. All right. So that's really all I wanted to do in this video is just cover the other options that we have for smoothing out values, especially these vectors and floats. So in the next video, we're going to take a look at how to properly make sure that the camera is always maintaining its distance behind the character while still smoothing out the camera motion. Okay. Thanks so much.