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 6e0f14d5 2021-10-04 op if which sha256 2>/dev/null >/dev/null; then
7 6e0f14d5 2021-10-04 op exec sha256 < "$1" > "$2"
10 6e0f14d5 2021-10-04 op if which sha256sum 2>/dev/null >/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"