Last active
January 28, 2021 10:50
-
-
Save marekkowalczyk/5dcae326d2148c2757c386776ae455d7 to your computer and use it in GitHub Desktop.
Print definition of COMMAND, i.e. the line following NAME in its manpage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Print definition of COMMAND, i.e. the line following NAME in its manpage | |
# https://gist.github.com/marekkowalczyk/5dcae326d2148c2757c386776ae455d7 | |
man $1 | col -b | grep -A 3 ^NAME | sed -n 2,3p | sed -E 's/^ +//' | tr '\n' ' ' | |
printf "\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment