quuxfu: chop-chop
hacks and workarounds for certain computing problems
4.3.20
Bash one-liner to calculate md5sum by line, using Python
python -c "exec(\"import hashlib, sys\nfor line in sys.stdin:\n\tprint hashlib.md5(line).hexdigest()\")" <<<123$'\n'456
Output (includes newline):
ba1f2511fc30423bdbb183fe33f3dd0f
d2d362cdc6579390f1c0617d74a7913d
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)