Skip to content

Instantly share code, notes, and snippets.

@cubapp
Created August 4, 2025 13:23
Show Gist options
  • Save cubapp/10b810800c8f45edeb941de4f0dc18ef to your computer and use it in GitHub Desktop.
Save cubapp/10b810800c8f45edeb941de4f0dc18ef to your computer and use it in GitHub Desktop.
Mac OS X Automator for showing SHA sums in the Finder Menu Quick Actions
# in Automator go for New - Quick Action
# Run Shell Script, Workflow receives current: "files or folders" in "Finder.app"
# shell Pass Input: As Arguments
# then the automation will be present in Finder right click Quick Actions
for f in "$@"
do
hash=$(shasum -a 256 "$f" | awk '{print $1}' | fold -w32)
button=$(osascript -e "display dialog \"File: $f\n\nSHA256:\n$hash\n\n\" with title \"SHA256 Hash\" buttons {\"Copy to clipboard\", \"OK\"} default button 2")
if [[ $button == *"Copy"* ]]; then
printf "%s" "$hash" | tr -d '\n' | pbcopy
fi
done
@cubapp
Copy link
Author

cubapp commented Aug 4, 2025

SCR-20250804-nojt

@cubapp
Copy link
Author

cubapp commented Aug 4, 2025

SCR-20250804-nqme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment