Pages

Friday, 21 May 2021

When "echo" works together with "sha256sum"

By default, echo prints the args and an extra newline("\n"), which is usually not what we need when working with sha256sum.


# echo hello | sha256sum
5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03  -

# echo -n hello | sha256sum
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824  -


No comments:

Post a Comment