Thanks for posting your script, but I think it's incorrect in one aspect of its "necessity".
I can't put my finger on the thread, but we had one recently in which I believe it was reported that Disk Utility still offers secure delete with n overwrite options for connected external spinning rust drives. (Haven't got one to try.)
More: I think that relates to BOTH INternal and EXternal spinning rust.
Last edited by artie505; 07/08/17 02:25 AM. Reason: More