Checksum per line

Is there a way to calculate the checksum per line in Linux? The checksum commands that I saw ( cksum , md5sum , sha1sum , etc.) all require a file input and I don't have a file. I only have a path to the location and you want to calculate the checksum on that path.

+6
source share
2 answers
 echo -n 'exampleString' | md5sum 

must work.

+18
source
 echo -n "yourstring" |md5sum echo -n "yourstring" |sha1sum echo -n "yourstring" |sha256sum 

don't forget -n or the result will change (because the new line will be parsed)

+2
source

Source: https://habr.com/ru/post/896084/


All Articles