shasum -a 256 myfile.txt | awk '{print $1}' >myfile.txt.sha256sum gpg --output myfile.txt.sha256sum.sig --sign myfile.txt.sha256sum