Hacker News new | ask | show | jobs
by stonesweep 1878 days ago
Man pages can be tricky as the content can vary distro by distro (how up to date is your copy of man-pages, what changes have happened, etc.) - this technique is pretty portable to extract the synopsis of a man page specifically due to the format it uses (most times I'd use like grep -A3 -B2 foo /some/file, e.g.).
1 comments

Ugly way to get the first indented line: `man systemd | grep '^ ' | head -1`

Which is the summary