{"id":51029,"date":"2021-09-13T22:17:38","date_gmt":"2021-09-13T22:17:38","guid":{"rendered":"https:\/\/papersspot.com\/blog\/2021\/09\/13\/lab-3-week-3\/"},"modified":"2021-09-13T22:17:38","modified_gmt":"2021-09-13T22:17:38","slug":"lab-3-week-3","status":"publish","type":"post","link":"https:\/\/papersspot.com\/blog\/2021\/09\/13\/lab-3-week-3\/","title":{"rendered":"Lab 3 week 3"},"content":{"rendered":"<p>sh (replace \u201cyourlastname\u201d with your actual last name). <br \/> Background <br \/> Congratulations! You\u2019ve just been hired as the Computer Person by a non-profit charitable organization. <br \/> Your new boss, Ms. Lee Nix, has just called you to discuss the organization\u2019s fundraising goals for the <br \/> coming year. Ms. Nix would like to send a \u201cThank You\u201d email to all individuals who have donated to the <br \/> organization in the past, in the hopes that this will also serve as a gentle reminder to consider making <br \/> another donation. Because not all donors provided an email address, Ms. Nix has also just acquired <br \/> software that generates automated phone calls when given a list of phone numbers as input. <br \/> Unfortunately, the three individuals whose responsibility it has been to keep track of donor contact <br \/> information all used vastly different formats to do so. Making things even more difficult is the fact that <br \/> none of these formats was internally consistent. There are millions of lines of text involved, and <br \/> extracting the necessary information by hand is out of the question. <br \/> Goal <br \/> Lee Nix requests that you utilize your Computer Person skills to extract all of the valid email addresses <br \/> and telephone numbers from the combined plain-text file containing all of the donor contact <br \/> information which was tracked by the three different individuals. The input file contains several million <br \/> lines of text (not every line has contact information on it). To make program development and testing <br \/> easier, you\u2019ve extracted a small subset containing examples of various formats (input.txt). <br \/> Ms. Nix would like for you to get this done as quickly as possible, even offering her lucky red hat as an <br \/> additional incentive to work quickly. It occurs to you that a shell script using egrep and regular <br \/> expressions is the perfect solution for this problem. <br \/> Script Requirements <br \/> 1) You decided to start the file name with your last name, followed by an underscore, and then <br \/> \u201clab3.sh\u201d (for some odd reason). <br \/> 2) Input arguments will be either -e filename or -p filename. -e will cause the script to print out the <br \/> email addresses. -p will print out phone numbers. <br \/> 3) You definitely aren\u2019t going to need entire lines to be printed, just the email addresses or the <br \/> phone numbers, so you decide to use the -o argument together with egrep to extract needed <br \/> information from the file. <br \/> 4) Ms. Nix told you that she\u2019s certain that phone numbers will have one of these two forms: <br \/> ddd-ddd-dddd or (ddd)ddd-dddd. <br \/> The following page contains your notes regarding what results the script should produce when applied <br \/> to the file input.txt <\/p>\n","protected":false},"excerpt":{"rendered":"<p>sh (replace \u201cyourlastname\u201d with your actual last name). Background Congratulations! You\u2019ve just been hired as the Computer Person by a non-profit charitable organization. Your new boss, Ms. Lee Nix, has just called you to discuss the organization\u2019s fundraising goals for the coming year. Ms. Nix would like to send a \u201cThank You\u201d email to all [&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":[28],"class_list":["post-51029","post","type-post","status-publish","format-standard","hentry","category-research-paper-writing","tag-computer-science"],"_links":{"self":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/51029","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=51029"}],"version-history":[{"count":0,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/51029\/revisions"}],"wp:attachment":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/media?parent=51029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/categories?post=51029"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/tags?post=51029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}