6 ms·
This makes no sense (too abstract of a statement), but here let's try this: $ man systemd | head -4 | tail -1 systemd, init - systemd system and ser
by stonesweep 5y ago
This makes no sense (too abstract of a statement), but here let's try this:
$ man systemd | head -4 | tail -1
systemd, init - systemd system and service manager
An email daemon (Postfix, Exim, Dovecot, UW-IMAP, Sendmail, etc.) are services running on a server. An "email server" would be a server running a daemon to provide email service in this example.
- ape4 5y agoThis makes me think there should be a Linux tool to extract the Nth line of a file. With options to get the N-Mth lines, etc
- stonesweep 5y agoMan 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.).
- ape4 5y agoUgly way to get the first indented line: `man systemd | grep '^ ' | head -1` Which is the summary
- ipaddr 5y agoThere are many. Sed is fast. This will give you lines 11 to 500 sed -n '11,500p' < file.txt
- mprovost 5y agoCalling cut with a newline as the field delimiter works: man systemd | cut -d $'\n' -f 4 Works with multiple lines too: cut -d $'\n' -f 10-20,50-60
- imwillofficial 5y agoMakes plenty of sense: https://man7.org/linux/man-pages/man1/smtp.1.html https://man7.org/linux/man-pages/man1/smtp.1.html "SMTP transaction against an SMTP server"