upvote
Looks like the above assumes a POSIX shell, so one could argue a dedicated script would actually be more portable.
reply
deleted
reply