dotfiles/.local/bin/tools/score
2020-07-04 14:23:27 +02:00

4 lines
134 B
Bash
Executable File

#!/bin/sh
categories=$(( $(cat $1 | grep -oE '[0-9]*$' | wc -l ) - 1 ))
grep -oE '[0-9]*$' $1 | head -n $categories | paste -sd+ | bc