How do I pass a password to hdiutil attach?
I have an encrypted sparsebundle (test.sparsebundle) and it's password is "test", with no quotes.
I'd like to automate opening that file.
I have tried
echo "test" | hdiutil attach -stdinpass test.sparsebundle
and
echo test | hdiutil attach -stdinpass test.sparsebundle
But it returns
hdiutil: attach failed - Authentication error