And*_*rei 7 applescript context-menu checksum automator macos
为了计算下载文件的 SHA1 校验和,我可以输入
/usr/bin/openssl sha1
Run Code Online (Sandbox Code Playgroud)
在终端中,然后将我要检查的文件拖到那里。为了更简单,可以为此操作启用上下文菜单项。
在 Mac OS X 10.6 中创建此类项目的最佳方法是什么?感谢提供详细的答案,因为我对 AppleScript 等没有很好的经验。
一步步
/usr/bin/openssl sha1 "$@"
并将输入作为参数传递我怎样才能得到输出?最好在 Growl 弹出窗口或消息窗口/对话框中。
Gor*_*son 10
添加操作运行 Shell 脚本,将 Shell 设置为 /bin/bash 并将输入传递为“作为参数”,然后输入此脚本:
for file; do
if [[ -d "$file" ]]; then
echo "$(basename "$file") is a directory"
else
cd "$(dirname "$file")"
/usr/bin/openssl sha1 "$(basename "$file")"
fi
done | tr "\n" "\r"
Run Code Online (Sandbox Code Playgroud)添加操作运行 Applescript,并输入此脚本:
on run {input, parameters}
tell application "System Events"
activate
display dialog input buttons {"OK"} default button 1
end tell
end run
Run Code Online (Sandbox Code Playgroud)使用描述性名称保存服务