https://leancrew.com/all-this/2022/03/last-man-standing/ [snowman-20] And now it's all this I just said what I said and it was wrong Or was taken wrong Previous post Last man standing March 26, 2022 at 6:57 PM by Dr. Drang Back in 2009, I wrote a post about various (mostly unsatisfying) ways of viewing manual (man) pages on the Mac. Many of the commands and apps in that post are either dead or abandoned, and some years ago I returned to a system that's not much different from what I used when I was running Linux back in the early 2000s. I recently expanded my script to handle sections the same way the man command does. At its most basic, the man command is invoked like this: man [section] command where command is the name of the command you want to learn about. Man pages are categorized in sections, and you can add the optional [section] if necessary to eliminate ambiguity. For instance, there are two man page entries for printf. One, in Section 1, covers the printf user command, which you can run interactively from the Terminal or put in shell scripts. The other, in Section 3, covers the printf function from the Standard C library. The main problem with the man command is that it takes over your terminal window--you can't refer to it while you're constructing a command unless you open a second terminal window first or use the control-click trick. To get around this problem, I wrote a short shell script, called bman, that opens the man page in a new BBEdit window. Since I always have BBEdit running, this works just about as fast as the regular old man command. I invoke it this way from the command line, bman [section] command using the same basic structure as man itself. For example, bman col will pop up this window: Man page for col in BBEdit IF the man page is long, I can use all the familiar BBEdit search commands I use every day to find what I want. Here's the code for bman: bash: 1: #!/bin/bash 2: 3: # Interpret the arguments as command name and section. As with `man`, 4: # the section is optional and comes first if present. 5: if [[ $# -lt 2 ]]; then 6: cmd=${1} 7: sec='' 8: else 9: cmd=${2} 10: sec=${1} 11: fi 12: 13: # Get the formatted man page, filter out backspaces and convert tabs 14: # to spaces, and open the text in a new BBEdit document. 15: man $sec $cmd | col -bx | bbedit 16: 17: # Set the document name and cursor position within BBEdit 18: osascript <