I am not really sure, why to use Babashka for one step of the
transformation, which basically only prefixes a filename with a command.
If your filenames are "sane", this is just prefixing a string which
could as well be done with sed
or awk
. And if they are "tricky" (as
already pointed out in the comments), this won't cut it.
So may I suggest to use Babashka instead of a shell for all the work.
(ns script
(:require [babashka.fs]
[babashka.process]))
(defn xlsx2csv
[file-name]
(->
(babashka.process/process ["xlsx2csv" file-name] {:out :inherit})
(babashka.process/check)))
(run!
xlsx2csv
(babashka.fs/glob "." "*.xlsx"))