Skip to content

Instantly share code, notes, and snippets.

@groundnuty
Created May 11, 2018 12:03
Show Gist options
  • Save groundnuty/9eaf30591b5b1e45f8f9b7b4f289c0b6 to your computer and use it in GitHub Desktop.
Save groundnuty/9eaf30591b5b1e45f8f9b7b4f289c0b6 to your computer and use it in GitHub Desktop.
Premium Mobile Pdf Invoice Check
cat ~/Downloads/FV-018195-18-05-1-022909-biling.txt | sed -n -e '/Data polczenia/,$p' | sed -n -e '2,$p' | grep -v " 0,00 " | sed 's/[[:space:]]\{15\}/\tX\t/g' | sed -e '/.*(Rozliczenie pakietu:$/{n;d}' | sed 's/[[:space:]][[:space:]]\+/\t/g' | cut -d $'\t' -f 5 | sed -n -e '0,/Lcznie/p' | sed \$d | tr ',' . | paste -s -d+ - | bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment