My Scripts on Mac
The Mac terminal might use bash - at least as of El Capitan versions it does - but that doesn’t mean that all of the terminal tools are the familiar GNU versions.
As I mentioned in a previous post a while back, most of the simpler aliases and scripts actually still work. There are a few rough edges as one might expect, such as the ls command not taking the --color flag and various inanities that aren’t a big deal to handle once you are aware.
Recently I have been playing more and more with using the GPG system to encrypt various types of files. Another post that I wrote a while back covered the encedit bash script that I had written to simplify the task of editing an encrypted file in a more or less secure manner. Following that I wrote a clone called cryptar which was the same thing except for a directory of files stored in a tarball that is then encrypted. I don’t think I have made any posts about cryptar at this point yet.
This morning I attempted to use the GPG stuff on my mac for the first time. I installed my root key and then attempted to use encedit to see if it would work for me without changes…
I didn’t have a lot of time before I had to leave for work though so I’m not yet sure what the root cause of the problems are. At first glance it looks like the bash script is not getting the command line arguments correctly. No explanation yet.
I really want to find an explanation, however, I think for robustness I am better off re-writing some of the more complicated scripts in python. I shall post about the python versions of the encedit and cryptar tools when I get around to implementing them.