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
sed  md5sum 
comments powered by Disqus