Printing string representations of xattr hex output
I'm trying to write a script to extract the original download URL from disk images downloaded with Safari on OS X using xattr, so that I can rename them but still easily obtain their original names for reference. This command prints the hex representation of the URL that the given file was downloaded from, as an example: xattr -p com.apple.metadata:kMDItemWhereFroms *.dmg gives 62 70 6C 69 73 74 30 30 A1 01 5F 10 4F 68 74 74 70 3A 2F 2F 61 64 63 64 6F 77 6E 6C 6F 61 64 2E 61 70 70 6C 65 2E 63 6F 6D 2F 4D 61 63 5F 4F 53 5F 58 2F 6D 61 63 5F 6F 73 5F 78 5F 31 30 2E 36 2E 31 5F 62 75 69 6C 64 5F