3 ms·
No need for "$@" there? (Not many file names with spaces?)
No need for "$@" there? (Not many file names with spaces?)
And they’ll want to quote the interior part of "$(basename "${file}")" too.
Also, just use
for file; do blah done
which is equivalent to
for file in "$@"; do blah done
shorter and no bug.