News for hackers. Stuff that matters.
Re:A serverless email server on AWS using S3 and SES by ape4 on Friday April 30, 2021 @11:20AM (#26994576)
This 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
Re:A serverless email server on AWS using S3 and SES by ipaddr on Friday April 30, 2021 @11:37AM (#26994836)
There are many. Sed is fast. This will give you lines 11 to 500

sed -n '11,500p' < file.txt

Re:A serverless email server on AWS using S3 and SES by stonesweep on Friday April 30, 2021 @11:24AM (#26994616)
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.).
Re:A serverless email server on AWS using S3 and SES by ape4 on Friday April 30, 2021 @11:36AM (#26994819)
Ugly way to get the first indented line: `man systemd | grep '^ ' | head -1`

Which is the summary

Re:A serverless email server on AWS using S3 and SES by mprovost on Friday April 30, 2021 @01:43PM (#26996734)
Calling 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