How extraordinary! That had literally just occurred to me (finally, after 22 hours of fretting over your result ) and I was just about to test it when your message appeared in the thread!
Thanks. The first line’s just to insert the “Deleted User List:” header. It would be simpler just to “echo” it earlier in the shell script:
do shell script "echo 'Login User List:' ; dscl . list /Users UniqueID | egrep -v ^'_|daemon|nobody|root' ; echo '\\nDeleted User List:' ; (defaults read /Library/Preferences/com.apple.preferences.accounts || echo '') | sed -En '