My Quick Notes

Ain't Nobody Got Time to Read

May 3, 2019

Get md5sum of lines in a file

Use sed and md5sum

$ sed -n <begin_line>,<end_line>p <file_name> | md5sum

For example, to get checksum from line 2 to line 15 in a file sample.txt

$ sed -n 2,15p sample.txt | md5sum
PreviousSSH login without password
NextDebian repository for EOL version

Comments