面试题答案
一键面试#!/bin/bash
if [ ! -f test.txt ]; then
echo "文件 test.txt 不存在"
else
md5sum test.txt > checksums.txt
sha256sum test.txt >> checksums.txt
fi
#!/bin/bash
if [ ! -f test.txt ]; then
echo "文件 test.txt 不存在"
else
md5sum test.txt > checksums.txt
sha256sum test.txt >> checksums.txt
fi