Created
May 14, 2021 22:04
-
-
Save OneOfOne/bd06b332abdc83e82148db30e8a212e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function convert() { | |
local fp="$(realpath "$1")" | |
local d="" | |
if [ -d "$fp" ]; then | |
d="$fp" | |
fp="$d/*.xlsx" | |
else | |
d="$(dirname "$fp")" | |
fi | |
echo libreoffice --headless --convert-to csv --outdir "$d" "$fp" | |
libreoffice --headless --convert-to csv --outdir "$d" "$fp" | |
} | |
for fp in "$@"; do | |
convert "$fp" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment