{"id":70,"date":"2010-06-29T14:25:46","date_gmt":"2010-06-29T14:25:46","guid":{"rendered":"http:\/\/odhyan.com\/?p=70"},"modified":"2010-08-11T18:00:11","modified_gmt":"2010-08-11T18:00:11","slug":"ack-better-than-grep","status":"publish","type":"post","link":"https:\/\/odhyan.com\/blog\/2010\/06\/ack-better-than-grep\/","title":{"rendered":"ACK &#8211; Better than GREP"},"content":{"rendered":"<p>One of the most useful tools in unix is grep. Almost every unix\/linux user use it frequently. But not many know about a tool which is better then grep &#8211; <a title=\"Better then grep\" href=\"http:\/\/betterthangrep.com\/\" target=\"_blank\">ack<\/a>. It makes life so easy for you. Some of the features that made me switch to ack:<\/p>\n<ul>\n<li>Lot faster than grep.<\/li>\n<\/ul>\n<ul>\n<li>Default recursive search.<\/li>\n<\/ul>\n<ul>\n<li>Ignores most of the crap you don&#8217;t want to search: SVN, CVS, binary files, etc.<\/li>\n<\/ul>\n<p>So instead of doing<\/p>\n<blockquote><p>grep -r &#8216;string&#8217; . | grep -v &#8216;\\.svn&#8217; | grep -v &#8216;FreeBSD&#8217;<\/p><\/blockquote>\n<p>I can do<\/p>\n<blockquote><p>ack &#8216;string&#8217;<\/p><\/blockquote>\n<ul>\n<li>By default searches only the files that it recognizes. You can edit the list of files so that ack can recognize them or use a flag to search all files.<\/li>\n<\/ul>\n<ul>\n<li> Color highlighting of search results.<\/li>\n<\/ul>\n<p>Since ack is written in perl, it has ports for both mac and windows.<\/p>\n<p>So if you haven&#8217;t used <a title=\"Better then grep\" href=\"http:\/\/betterthangrep.com\/\" target=\"_blank\">ack<\/a> yet, give it a try. Trust me, you&#8217;ll love it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most useful tools in unix is grep. Almost every unix\/linux user use it frequently. But not many know about a tool which is better then grep &#8211; ack. It makes life so easy for you. Some of the features that made me switch to ack: Lot faster than grep. Default recursive search.&hellip;<\/p>\n <a href=\"https:\/\/odhyan.com\/blog\/2010\/06\/ack-better-than-grep\/\" title=\"ACK &#8211; Better than GREP\" class=\"entry-more-link\"><span>Read More<\/span> <span class=\"screen-reader-text\">ACK &#8211; Better than GREP<\/span><\/a>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[14,13,15,12],"class_list":["entry","author-saurabh","post-70","post","type-post","status-publish","format-standard","category-unix","tag-grep","tag-perl","tag-tools","tag-unix-2"],"_links":{"self":[{"href":"https:\/\/odhyan.com\/blog\/wp-json\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/odhyan.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/odhyan.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/odhyan.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/odhyan.com\/blog\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":12,"href":"https:\/\/odhyan.com\/blog\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":87,"href":"https:\/\/odhyan.com\/blog\/wp-json\/wp\/v2\/posts\/70\/revisions\/87"}],"wp:attachment":[{"href":"https:\/\/odhyan.com\/blog\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/odhyan.com\/blog\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/odhyan.com\/blog\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}