dotfiles/.local/bin/tools/score

4 lines
134 B
Plaintext
Raw Normal View History

2020-07-04 14:23:27 +02:00
#!/bin/sh
categories=$(( $(cat $1 | grep -oE '[0-9]*$' | wc -l ) - 1 ))
grep -oE '[0-9]*$' $1 | head -n $categories | paste -sd+ | bc