Como posso obter seções com números de série no comando man man no terminal Mac

0

No terminal MAC, como posso obter algo assim:

1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conventions), e.g. man(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
    
por user234524 04.06.2017 / 19:33

1 resposta

0

Pode ser algo assim?

man -a intro |                            # awk grabs the header from each intro man page
awk '/INTRO/ { $1 = substr($1,7,1)        # set $1 to x in INTRO(x)
               $2 = ""                    # set $2 to nothing
               sub(/INTRO\([0-9]\)/, "")  # remove the string INTRO(x) from last field
               print | "sort"
}'

Os resultados:

1  General Commands Manual 
2  System Calls Manual 
3  Library Functions Manual 
5  File Formats Manual 
7  Miscellaneous Information Manual 
8  System Manager's Manual 
9  Kernel Developer's Manual 

Observe as seções ausentes.

    
por 05.06.2017 / 22:24

Tags