Reputation: 29
There are unprintable characters in an applescript file. However, when i attempt to run strings on the file, it doesn't output all printable characters. It only outputs a portion of the file as plain text.
So I have a file (specifically an Applescript *.scpt file). It's a binary file that contains the script text encoded as, for example, "t\0h\0i\0s" which when the file is opened in the editor, it shows "this". Hexdump shows char "t" followed by char NULL, etc. Opening the file with "less" also shows "t^@h^@i^@s^@" etc.
However, when I do "strings myscript.scpt" it doesn't show the chars. It just shows ancillary stuff, like the file type header, some other random stuff. I tried "-a" and "-" as options to no avail.
Granted, I got my answer (without opening the script in applescript) via "hexdump -C" and using "less", but why doesn't it work with "strings"? I was under the assumption (incorrectly obviously) that it would strip non printable chars and dump the printable bits.
Upvotes: 0
Views: 20