{"id":6392,"date":"2022-12-20T18:58:17","date_gmt":"2022-12-20T21:58:17","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/linsert-mann\/"},"modified":"2022-12-20T18:58:17","modified_gmt":"2022-12-20T21:58:17","slug":"linsert-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/linsert-mann\/","title":{"rendered":"linsert (mann)"},"content":{"rendered":"<h1 align=\"center\">linsert<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLE\">EXAMPLE<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#KEYWORDS\">KEYWORDS<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">linsert \u2212 Insert elements into a list<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>linsert<\/b> <i>list index<\/i> ?<i>element element &#8230;<\/i>? ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This command produces a new list from <i>list<\/i> by inserting all of the <i>element<\/i> arguments just before the <i>index<\/i>\u2019th element of <i>list<\/i>. Each <i>element<\/i> argument will become a separate element of the new list. If <i>index<\/i> is less than or equal to zero, then the new elements are inserted at the beginning of the list, and if <i>index<\/i> is greater or equal to the length of <i>list<\/i>, it is as if it was <b>end<\/b>. As with <b>string index<\/b>, the <i>index<\/i> value supports both simple index arithmetic and end-relative indexing.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Subject to the restrictions that indices must refer to locations inside the list and that the <i>element<\/i>s will always be inserted in order, insertions are done so that when <i>index<\/i> is start-relative, the first <i>element<\/i> will be at that index in the resulting list, and when <i>index<\/i> is end-relative, the last <i>element<\/i> will be at that index in the resulting list.<\/p>\n<h2>EXAMPLE <a name=\"EXAMPLE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Putting some values into a list, first indexing from the start and then indexing from the end, and then chaining them together:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">set oldList {the fox jumps over the dog} <br \/> set midList [<b>linsert<\/b> $oldList 1 quick] <br \/> set newList [<b>linsert<\/b> $midList end-1 lazy] <br \/> # The old lists still exist though&#8230; <br \/> set newerList [<b>linsert<\/b> [<b>linsert<\/b> $oldList end-1 quick] 1 lazy]<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">list(n), lappend(n), lindex(n), llength(n), lsearch(n), lset(n), lsort(n), lrange(n), lreplace(n), string(n)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">element, insert, list<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  linsert \u2212 Insert elements into a list <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3783,1],"tags":[2956,2635],"class_list":["post-6392","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-linsert","tag-mann"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6392"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6392\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}