{"id":28115,"date":"2021-09-10T13:12:07","date_gmt":"2021-09-10T17:12:07","guid":{"rendered":"https:\/\/blog.carlrobitaille.org\/?p=28115"},"modified":"2021-09-10T13:12:09","modified_gmt":"2021-09-10T17:12:09","slug":"colorizing-the-grep-output","status":"publish","type":"post","link":"https:\/\/blog.carlrobitaille.org\/?p=28115","title":{"rendered":"Colorizing the grep output"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"twitter-tweet\" data-width=\"550\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">We can colorize the grep output using the &#8211;color option but it will fain with a pipe on Linux\/Unix. For example:<br>grep &#8211;color foo input | more<br>grep &#8211;color foo input | less -r<br><br>But this will work<br>grep &#8211;color=always foo input | less -r<br><br>See <a href=\"https:\/\/t.co\/fjzv1iiHXt\">https:\/\/t.co\/fjzv1iiHXt<\/a> for more info. <a href=\"https:\/\/t.co\/JdOjQJDlpS\">pic.twitter.com\/JdOjQJDlpS<\/a><\/p>&mdash; nixCraft \ud83d\udc27 (@nixcraft) <a href=\"https:\/\/twitter.com\/nixcraft\/status\/1432789644349886466?ref_src=twsrc%5Etfw\">August 31, 2021<\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-28115","post","type-post","status-publish","format-standard","hentry","category-informatique"],"_links":{"self":[{"href":"https:\/\/blog.carlrobitaille.org\/index.php?rest_route=\/wp\/v2\/posts\/28115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.carlrobitaille.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.carlrobitaille.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.carlrobitaille.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.carlrobitaille.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=28115"}],"version-history":[{"count":1,"href":"https:\/\/blog.carlrobitaille.org\/index.php?rest_route=\/wp\/v2\/posts\/28115\/revisions"}],"predecessor-version":[{"id":28116,"href":"https:\/\/blog.carlrobitaille.org\/index.php?rest_route=\/wp\/v2\/posts\/28115\/revisions\/28116"}],"wp:attachment":[{"href":"https:\/\/blog.carlrobitaille.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.carlrobitaille.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.carlrobitaille.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}