3 6e0f14d5 2021-10-04 op # USAGE: ./sha in out
4 6e0f14d5 2021-10-04 op # writes the sha256 of in to file out
6 12fcba2f 2022-02-27 op if command -v sha256 >/dev/null; then
7 6e0f14d5 2021-10-04 op exec sha256 < "$1" > "$2"
10 12fcba2f 2022-02-27 op if command -v sha256sum >/dev/null; then
11 6e0f14d5 2021-10-04 op sha256sum "$1" | awk '{print $1}' > "$2"
15 6e0f14d5 2021-10-04 op echo "No sha binary found"