更新时间:2021-07-20 00:08:09
快到了,试试这个:
while read line; do echo -n $line|md5; done < 123.txt
除非你也想在哈希每行换行字符,你应该包括-n选项。
Unless you also want to hash the newline character in every line you should include the '-n' option.
在一个脚本:
#!/bin/bash
while read line; do echo -n $line|md5; done < $1