Skip to content

Instantly share code, notes, and snippets.

@adamlacombe
Created December 17, 2020 23:18
Show Gist options
  • Save adamlacombe/40899c36429287b57c65b5e20759683c to your computer and use it in GitHub Desktop.
Save adamlacombe/40899c36429287b57c65b5e20759683c to your computer and use it in GitHub Desktop.
Convert multiple xlsx files to csv files then merge multiple csv files into one
#!/bin/bash
# https://stackoverflow.com/a/21651707/9238321
for i in *.xlsx; do libreoffice --headless --convert-to csv "$i" ; done
# https://unix.stackexchange.com/a/558965
awk '(NR == 1) || (FNR > 1)' *.csv > all.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment