You are not logged in.

#1 2024-03-08 11:02:16

AlwaysFinking
Member
Registered: 2024-01-14
Posts: 23

Man page is missing information

I've man-db and manpages installed. Below is the output of `man gets`. You can see that this is missing many sections like BUGS and HISTORY from here https://man7.org/linux/man-pages/man3/gets.3.html. How do I have it show the full manpage?

 
gets(n)                             Tcl Built-In Commands                            gets(n)

____________________________________________________________________________________________

NAME
       gets - Read a line from a channel

SYNOPSIS
       gets channelId ?varName?
____________________________________________________________________________________________

DESCRIPTION
       This command reads the next line from channelId, returns everything in the line up to
       (but  not including) the end-of-line character(s), and discards the end-of-line char‐
       acter(s).

       ChannelId must be an identifier for an open channel such as the  Tcl  standard  input
       channel (stdin), the return value from an invocation of open or socket, or the result
       of a channel creation command provided by a Tcl extension. The channel must have been
       opened for input.

       If  varName is omitted the line is returned as the result of the command.  If varName
       is specified then the line is placed in the variable by  that  name  and  the  return
       value is a count of the number of characters returned.

       If end of file occurs while scanning for an end of line, the command returns whatever
       input  is  available up to the end of file.  If channelId is in non-blocking mode and
       there is not a full line of input available, the command returns an empty string  and
       does  not consume any input.  If varName is specified and an empty string is returned
       in varName because of end-of-file or because of  insufficient  data  in  non-blocking
       mode,  then  the  return count is -1.  Note that if varName is not specified then the
       end-of-file and no-full-line-available cases can produce the same results as if there
       were an input line consisting only of the  end-of-line  character(s).   The  eof  and
       fblocked commands can be used to distinguish these three cases.

EXAMPLE
       This  example reads a file one line at a time and prints it out with the current line
       number attached to the start of each line.

              set chan [open "some.file.txt"]
              set lineNumber 0
              while {[gets $chan line] >= 0} {
                  puts "[incr lineNumber]: $line"
              }
              close $chan

SEE ALSO
       file(n), eof(n), fblocked(n), Tcl_StandardChannels(3)

KEYWORDS
       blocking, channel, end of file, end of line, line, non-blocking, read

Tcl                                          7.5                                     gets(n)

Offline

#2 2024-03-08 11:22:12

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,230

Re: Man page is missing information

You're not looking at the right man page. Try "man 3 gets" https://wiki.archlinux.org/title/Man_pa … _man_pages

Offline

#3 2024-03-08 11:51:06

AlwaysFinking
Member
Registered: 2024-01-14
Posts: 23

Re: Man page is missing information

No luck

~ ❯ man 3 gets
No manual entry for gets in section 3

I saw a guy on youtube just type `man gets` and get the same info as the website. He was on parrot os tho.

Last edited by AlwaysFinking (2024-03-08 11:59:30)

Offline

#4 2024-03-08 13:22:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,230

Re: Man page is missing information

It should be there

whatis gets
pacman -Qs man-pages
pacman -Qo /usr/share/man/man3/gets.3.gz

Last edited by V1del (2024-03-08 13:24:49)

Offline

#5 2024-03-09 15:13:38

AlwaysFinking
Member
Registered: 2024-01-14
Posts: 23

Re: Man page is missing information

 ❯ pacman -Qs man-pages
 ❯ pacman -Qo /usr/share/man/man3/gets.3.gz
error: No package owns /usr/share/man/man3/gets.3.gz
 ❯ whatis gets
gets (n)             - Read a line from a channel

Smth is missing it looks like

Offline

#6 2024-03-09 15:18:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: Man page is missing information

the fact that -Qs returns nothing shows there's nothing matching that name installed.

Offline

#7 2024-03-09 15:53:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,459
Website

Re: Man page is missing information

Also note that the `man <name>` command without a specific section provided will just use the first available man page matching the name.  There can be many man pages with the same name.  The person on youtube you refer to gets the proper page because they have it installed.  You are getting the tcl gets.n page because it may be the only gets.* man page installed (or it is at least higher priority than any others you have installed).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2024-03-09 16:13:16

mpan
Member
Registered: 2012-08-01
Posts: 1,599
Website

Re: Man page is missing information

What Scimmia is saying, is that you must install the manual pages package first.

Extending Trilby’s comment, a hint: options -a, -k and -K in `man`. A meta-hint: as you can see all manual pages from Arch are available online. While it’s best to have man-pages installed locally, in general this allows you to access pages of packages not in your system. If you’re using DuckDuckGo as your search engine, it even has a dedicated bang for searching: `!archman` (and also `!aw` for searching in Arch Wiki).


Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

Board footer

Powered by FluxBB