{"id":6408,"date":"2022-12-20T18:58:19","date_gmt":"2022-12-20T21:58:19","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/tell-mann\/"},"modified":"2022-12-20T18:58:19","modified_gmt":"2022-12-20T21:58:19","slug":"tell-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/tell-mann\/","title":{"rendered":"tell (mann)"},"content":{"rendered":"<h1 align=\"center\">tell<\/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\">tell \u2212 Return current access position for an open channel<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>tell<\/b> <i>channelId<\/i> ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Returns an integer string giving the current access position in <i>channelId<\/i>. This value returned is a byte offset that can be passed to <b>seek<\/b> in order to set the channel to a particular position. Note that this value is in terms of bytes, not characters like <b>read<\/b>. The value returned is -1 for channels that do not support seeking.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>ChannelId<\/i> must be an identifier for an open channel such as a Tcl standard channel (<b>stdin<\/b>, <b>stdout<\/b>, or <b>stderr<\/b>), the return value from an invocation of <b>open<\/b> or <b>socket<\/b>, or the result of a channel creation command provided by a Tcl extension.<\/p>\n<h2>EXAMPLE <a name=\"EXAMPLE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Read a line from a file channel only if it starts with <b>foobar<\/b>:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"># Save the offset in case we need to undo the read&#8230; <br \/> set offset [<b>tell<\/b> $chan] <br \/> if {[read $chan 6] eq &#8220;foobar&#8221;} { <br \/> gets $chan line <br \/> } else { <br \/> set line {} <br \/> # Undo the read&#8230; <br \/> seek $chan $offset <br \/> }<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">file(n), open(n), close(n), gets(n), seek(n), Tcl_StandardChannels(3)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">access position, channel, seeking<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  tell \u2212 Return current access position for an open channel <\/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":[2635,2964],"class_list":["post-6408","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-mann","tag-tell"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6408","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=6408"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6408\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}