{"id":55402,"date":"2021-10-03T21:09:09","date_gmt":"2021-10-03T21:09:09","guid":{"rendered":"https:\/\/papersspot.com\/blog\/2021\/10\/03\/regular-expressionsgrep-sed-and-awk\/"},"modified":"2021-10-03T21:09:09","modified_gmt":"2021-10-03T21:09:09","slug":"regular-expressionsgrep-sed-and-awk","status":"publish","type":"post","link":"https:\/\/papersspot.com\/blog\/2021\/10\/03\/regular-expressionsgrep-sed-and-awk\/","title":{"rendered":"Regular Expressionsgrep, sed, and awk"},"content":{"rendered":"<p> For questions 1 &#8211; 6, use the file at ~Student\/FILES\/computers.txt on your VM. <br \/> 1.Find all entries of faculty whose name starts with the letter F, G, H, I, J or K. <br \/> 2.Find all entries of faculty whose name ends with an n. <br \/> 3.Find all entries that are on the 4th floor of their building.This means that the room number is 4xx (so for instance, it should not include 314 just because there is a 4). <br \/> 4.Find anyone whose office is only 2 digits.This one is tricky in that you have to figure out how to specify that it should not include 3-digit numbers. <br \/> 5.Find all entries that include either a Unix or Linux platform computer. <br \/> 6.Assume that you want to find all faculty who have a PC in their office.While the command egrep \u2018PC\u2019 computers.txt will work in this case, explain why it may not work in general.That is, what is a line you could insert into computers.txt that would give you a \u201cwrong\u201d answer? <\/p>\n<p> For questions 7 &#8211; 10, use the file at ~Student\/FILES\/addresses.txt <br \/> 7.Find all entries whose zip codes start with the digits 41. <br \/> 8.Find all entries in which their first and last names both start with the letter J. <br \/> 9.Find all entries of people who live in an apartment.NOTE:apartments are not necessarily indicated with the abbreviation apt, see for instance William Tuft and Jill Johnston. <br \/> 10.Find all entries where the street number is at least 4 digits.NOTE:this should not match the zip codes all of which are 5 digits. <br \/> For question 11, create a file ~\/Student\/FILES\/config_template.txt <\/p>\n<p> config_template.txt should have the following contents: <br \/> USERNAME=brian <br \/> PASSWORD=xxxxxxxx <br \/> 11.Using sed, replace \u201cbrian\u201d with your name, and \u201cxxxxxxxx\u201d with a password of your choosing.Write the resulting file to ~\/Student\/FILES\/config.txt. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>For questions 1 &#8211; 6, use the file at ~Student\/FILES\/computers.txt on your VM. 1.Find all entries of faculty whose name starts with the letter F, G, H, I, J or K. 2.Find all entries of faculty whose name ends with an n. 3.Find all entries that are on the 4th floor of their building.This means [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10],"class_list":["post-55402","post","type-post","status-publish","format-standard","hentry","category-research-paper-writing","tag-writing"],"_links":{"self":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/55402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/comments?post=55402"}],"version-history":[{"count":0,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/55402\/revisions"}],"wp:attachment":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/media?parent=55402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/categories?post=55402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/tags?post=55402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}