{"id":41199,"date":"2021-03-16T20:03:36","date_gmt":"2021-03-16T20:03:36","guid":{"rendered":"https:\/\/www.oracletutoring.ca\/blog\/?p=41199"},"modified":"2021-03-16T20:03:38","modified_gmt":"2021-03-16T20:03:38","slug":"linux-grep-part-0","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/linux-grep-part-0\/","title":{"rendered":"Linux: grep, part 0"},"content":{"rendered":"\n<h2>Self-tutoring about [Li|U]nix: the tutor begins about grep.<\/h2>\n<p>grep <em>string filename<\/em> looks for the <em>string<\/em> in the file called <em>filename<\/em>. The string can be a regular expression. In my experience, a regex needs to be quoted. For instance, on the system I use,<\/p>\n<p>grep &#8220;^[p|d][0-9]&#8221; <em>input<\/em><\/p>\n<p>will find p91 and also d899.txt as well. grep will return the entire line the match is found in.<\/p>\n<p>Not all systems treat grep with regex exactly the same &#8212; some claim they won&#8217;t support the or operator without using grep -E.<\/p>\nJack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.\n","protected":false},"excerpt":{"rendered":"<p>Self-tutoring about [Li|U]nix: the tutor begins about grep. grep string filename looks for the string in the file called filename. The string can be a regular expression. In my experience, a regex needs to be quoted. For instance, on the &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/linux-grep-part-0\/\"> <span class=\"screen-reader-text\">Linux: grep, part 0<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[637],"tags":[],"class_list":["post-41199","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/41199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=41199"}],"version-history":[{"count":5,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/41199\/revisions"}],"predecessor-version":[{"id":41204,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/41199\/revisions\/41204"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=41199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=41199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=41199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}