Skip to content

Instantly share code, notes, and snippets.

@jbothma
Created September 30, 2017 10:24
Show Gist options
  • Select an option

  • Save jbothma/c1dfb78a7b30fa28e32c1c892d5655c9 to your computer and use it in GitHub Desktop.

Select an option

Save jbothma/c1dfb78a7b30fa28e32c1c892d5655c9 to your computer and use it in GitHub Desktop.
save and change IFS to loop over filenames with spaces
SAVEIFS=$IFS; IFS=$(echo -en "\n\b"); for f in `ls */*/*.xlsm`; do echo soffice --headless --convert-to xlsx \"$f\" --outdir \"$(dirname $f)\"; done; IFS=$SAVEIFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment