{"id":2567,"date":"2023-11-09T07:12:08","date_gmt":"2023-11-09T07:12:08","guid":{"rendered":"https:\/\/myvlcsys.com\/?p=2567"},"modified":"2023-11-11T16:25:06","modified_gmt":"2023-11-11T16:25:06","slug":"linux-comando-cat","status":"publish","type":"post","link":"https:\/\/myvlcsys.com\/?p=2567","title":{"rendered":"LINUX: Comando Cat."},"content":{"rendered":"\n<p>El comando&nbsp;<em><strong>cat<\/strong><\/em>&nbsp;muestra sin paginar uno o varios ficheros por la salida est\u00e1ndar. Su funci\u00f3n fundamental es la de concatenar ficheros, para lo que se necesita tambi\u00e9n del redireccionamiento. La sintaxis general es:<\/p>\n\n\n\n<p><em><strong>cat [opci\u00f3n&#8230;] [fichero&#8230;]<\/strong><\/em><\/p>\n\n\n\n<p>Si no se especifica ning\u00fan fichero,&nbsp;<em>cat<\/em>&nbsp;lee de la entrada est\u00e1ndar.<\/p>\n\n\n\n<p>Podemos numerar todas las l\u00edneas con la opci\u00f3n&nbsp;<strong><em>-n<\/em><\/strong>, o saltando las l\u00edneas en blanco con&nbsp;<strong><em>-b<\/em><\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/myvlcsys.com\/wp-content\/uploads\/2023\/11\/image-2.png\" alt=\"\" class=\"wp-image-2575\" width=\"717\" height=\"447\" srcset=\"https:\/\/myvlcsys.com\/wp-content\/uploads\/2023\/11\/image-2.png 648w, https:\/\/myvlcsys.com\/wp-content\/uploads\/2023\/11\/image-2-300x187.png 300w\" sizes=\"(max-width: 717px) 100vw, 717px\" \/><figcaption>Comando Cat -n<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Si el fichero tiene lineas en blanco consecutivas y queremos que solo se muestre una, debemos usar la opci\u00f3n&nbsp;<strong><em>-s<\/em><\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/myvlcsys.com\/wp-content\/uploads\/2023\/11\/image-4.png\" alt=\"\" class=\"wp-image-2577\" width=\"731\" height=\"429\" srcset=\"https:\/\/myvlcsys.com\/wp-content\/uploads\/2023\/11\/image-4.png 644w, https:\/\/myvlcsys.com\/wp-content\/uploads\/2023\/11\/image-4-300x176.png 300w\" sizes=\"(max-width: 731px) 100vw, 731px\" \/><figcaption>Comando Cat -n<\/figcaption><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>El comando&nbsp;cat&nbsp;muestra sin paginar uno o varios ficheros por la salida est\u00e1ndar. Su funci\u00f3n fundamental es la de concatenar ficheros, para lo que se necesita tambi\u00e9n del redireccionamiento. La sintaxis&hellip; <\/p>\n","protected":false},"author":4,"featured_media":2066,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[30,10],"tags":[26,25,47,27,24],"class_list":["post-2567","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-comandos","category-linux","tag-debian","tag-linux","tag-myvlcsys","tag-sistemas","tag-terminal"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/myvlcsys.com\/index.php?rest_route=\/wp\/v2\/posts\/2567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myvlcsys.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myvlcsys.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myvlcsys.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/myvlcsys.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2567"}],"version-history":[{"count":4,"href":"https:\/\/myvlcsys.com\/index.php?rest_route=\/wp\/v2\/posts\/2567\/revisions"}],"predecessor-version":[{"id":2579,"href":"https:\/\/myvlcsys.com\/index.php?rest_route=\/wp\/v2\/posts\/2567\/revisions\/2579"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/myvlcsys.com\/index.php?rest_route=\/wp\/v2\/media\/2066"}],"wp:attachment":[{"href":"https:\/\/myvlcsys.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myvlcsys.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myvlcsys.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}