Possible Duplicate:
How to get the MD5 hash of a string directly in the terminal?
I have a given variable and I have to calculate its md5sum. I have tried with "md5sum $variable", but it doesn't work.
I have a given variable and I have to calculate its md5sum. I have tried with "md5sum $variable", but it doesn't work. |
|||
|
|
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
md5sum takes filenames as parameters. Iif you have a string you want to calculate the hash of, you need to pass it to md5sum's standard input via a pipe:
(-n to suppress adding a newline) |
||||
|
I think you could try this:
As suggested in comments, |
||||
|
|