{"id":208,"date":"2013-01-27T18:46:39","date_gmt":"2013-01-27T18:46:39","guid":{"rendered":"http:\/\/www.corrspt.com\/blog\/?p=208"},"modified":"2013-01-27T18:46:39","modified_gmt":"2013-01-27T18:46:39","slug":"find-and-replace-text-in-linuxosx","status":"publish","type":"post","link":"http:\/\/www.corrspt.com\/blog\/2013\/01\/27\/find-and-replace-text-in-linuxosx\/","title":{"rendered":"Find and Replace text in Linux\/OSX"},"content":{"rendered":"<p>This information is covered in several other blogs, tutorials and etc&#8230; but as my google skills tend to send me someplace different\u00a0every time\u00a0I search (yes I know bookmarks) I might as well leave it here for my future reference<\/p>\n<p>Find text<\/p>\n<pre class=\"brush:shell\">grep \"what to find\" \"fileToFind\"<\/pre>\n<p>Replace text in a file (OSX, notice the empty quotes at the beginning)<\/p>\n<pre class=\"brush:shell\">sed -i \"\" 's\/text_to_replace\/what_to_replace_with\/g' file_where_replacement_occurs<\/pre>\n<p>And in Linux the syntax is similar<\/p>\n<pre class=\"brush:shell\">sed -i 's\/text_to_replace\/what_to_replace_with\/g' file_where_replacement_occurs<\/pre>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This information is covered in several other blogs, tutorials and etc&#8230; but as my google skills tend to send me someplace different\u00a0every time\u00a0I search (yes I know bookmarks) I might as well leave it here for my future reference Find &hellip; <a href=\"http:\/\/www.corrspt.com\/blog\/2013\/01\/27\/find-and-replace-text-in-linuxosx\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-208","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts\/208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/comments?post=208"}],"version-history":[{"count":2,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts\/208\/revisions"}],"predecessor-version":[{"id":210,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts\/208\/revisions\/210"}],"wp:attachment":[{"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/media?parent=208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/categories?post=208"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/tags?post=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}