Skip to content

Instantly share code, notes, and snippets.

@lsemenenko
Last active July 17, 2020 02:04
Show Gist options
  • Select an option

  • Save lsemenenko/f47b93184afed83fd7c5589b4ff109f4 to your computer and use it in GitHub Desktop.

Select an option

Save lsemenenko/f47b93184afed83fd7c5589b4ff109f4 to your computer and use it in GitHub Desktop.
Format PDF text export from BOA for Tiller Import
#!/bin/bash
pat='([0-9]{2}/[0-9]{2}/[0-9]{2}).(.*)\ (-?[0-9,]+\.[0-9]{2})'
while IFS= read -r line; do
[[ $line =~ $pat ]] &&
echo "${BASH_REMATCH[1]}|${BASH_REMATCH[2]}|${BASH_REMATCH[3]}"
done <file.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment