{"id":655,"date":"2013-06-17T12:40:51","date_gmt":"2013-06-17T17:40:51","guid":{"rendered":"http:\/\/log.cagadaga.com\/?p=655"},"modified":"2014-01-21T11:06:30","modified_gmt":"2014-01-21T16:06:30","slug":"otra-de-utilidad","status":"publish","type":"post","link":"https:\/\/log.cagadaga.com\/?p=655","title":{"rendered":"Otra de Utilidad"},"content":{"rendered":"<p>De repente cuando utilizamos archivos de texto por ejemplos hechos en Windows y queremos usar en Linux nos muestra nuestro molesto caracter \u00c2 <b><font color=\"blue\">^M<\/font><\/b><\/p>\n<p>una manera rapida de quitarlos<\/p>\n<pre lang=\"bash\">\r\ncat main.cpp |tr -d \"\\r\" > archivo.tmp\r\n<\/pre>\n<p>O en caso de que sean varios archivos podemos meterlos en un ciclo for<\/p>\n<pre lang=\"bash\">\r\nfor i in $(ls -1);\r\ndo  \r\n    cat $i|tr -d \"\\r\" >temporal.tmp\r\n    mv temporal.tmp  $i\r\ndone\r\n<\/pre>\n<p>\ny listo<\/p>\n","protected":false},"excerpt":{"rendered":"<p>De repente cuando utilizamos archivos de texto por ejemplos hechos en Windows y queremos usar en Linux nos muestra nuestro molesto caracter \u00c2 ^M una manera rapida de quitarlos cat main.cpp |tr -d &#8220;\\r&#8221; > archivo.tmp O en caso de que sean varios archivos podemos meterlos en un ciclo for for i in $(ls -1);<span class=\"post-excerpt-end\">&hellip;<\/span><\/p>\n<p class=\"more-link\"><a href=\"https:\/\/log.cagadaga.com\/?p=655\" class=\"themebutton\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,21,3],"tags":[],"class_list":["post-655","post","type-post","status-publish","format-standard","hentry","category-chamba","category-geek","category-linux"],"_links":{"self":[{"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/posts\/655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=655"}],"version-history":[{"count":4,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/posts\/655\/revisions"}],"predecessor-version":[{"id":659,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=\/wp\/v2\/posts\/655\/revisions\/659"}],"wp:attachment":[{"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/log.cagadaga.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}